/* The four public piles and cooperative turn controls, using Rulezz tokens. */
html.rzux-mobile-actions-ready #game .phaseActions #cancelGame,html.rzux-host-desktop-reference #game .phaseActions #cancelGame{display:none}
#phaseStatus:empty{display:none}
.tg-piles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:14px 0}.tg-pile{display:grid;gap:8px;min-width:0;min-height:130px;padding:14px;border:2px solid var(--border,#34577a);border-radius:14px;background:var(--panel,#14243a);color:inherit;cursor:pointer;text-align:center}.tg-pile[aria-pressed=true]{border-color:var(--accent,#df5669);box-shadow:0 0 0 2px var(--accent2,#f6c870)}.tg-pile strong{font-size:34px;line-height:1}.tg-pile span{font-size:14px;font-weight:800}.tg-pile small{font-size:12px}.tg-pile:focus-visible{outline:3px solid var(--accent2,#ffca65);outline-offset:3px}.tg-active{border-left:4px solid var(--accent,#d94856)}.tg-active h2{font-size:21px;margin:0 0 8px}.tg-names,.tg-active p{overflow-wrap:anywhere}.tg-placement{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end}.tg-placement label{min-width:0}.tg-placement input{width:100%;min-height:48px;font-size:24px;text-align:center}.tg-placement #manualCard{grid-column:1/-1}.tg-draw-confirm{display:flex;align-items:center;gap:10px;margin:16px 0}.tg-draw-confirm input{flex:none;width:24px;height:24px;margin:0}.tg-turn-actions,.tg-recovery{display:flex;flex-wrap:wrap;gap:10px}.tg-turn-actions>.btn{flex:1;min-height:48px;white-space:normal}.phaseActions{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0}.tg-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.tg-metrics>div{padding:12px;border:1px solid var(--border,#34577a);border-radius:12px}.tg-metrics strong,.tg-metrics small{display:block}.tg-metrics strong{font-size:25px}.tg-statistics svg,#statsContent svg{width:100%;max-height:240px;color:var(--accent,#df5669)}.tg-history-entry{overflow-wrap:anywhere}.eventLog{max-height:none;overflow:visible}.eventLog li{margin:8px 0}.toast{z-index:9999}[hidden]{display:none!important}#setup input[data-name]{width:100%}button{cursor:pointer}button:disabled{opacity:.5;cursor:not-allowed}#game button{touch-action:manipulation}#sessionStatus:empty,.tg-recovery:empty{display:none}@media(max-width:430px){.tg-piles{gap:8px}.tg-pile{min-height:116px;padding:10px}.tg-pile span{font-size:12px}.tg-placement{grid-template-columns:minmax(0,1fr)}.tg-placement #manualCard{grid-column:auto}.phaseActions>.btn{flex:1;white-space:normal}.tg-metrics strong{font-size:21px}}
.tg-keypad{grid-column:1/-1;width:min(100%,240px);margin:0 auto}.tg-keypad h3{margin:0 0 8px;font-size:15px}.tg-keypad-grid{display:grid;grid-template-columns:repeat(3,minmax(48px,1fr));gap:7px}.tg-keypad-grid button{min-height:48px;border:1px solid var(--border,#34577a);border-radius:10px;background:var(--panel,#14243a);color:inherit;font:inherit;font-size:20px;font-weight:700;touch-action:manipulation}.tg-keypad-grid button:focus-visible{outline:3px solid var(--accent2,#ffca65);outline-offset:2px}.tg-keypad-status{min-height:1.4em;margin:5px 0 0;font-size:13px;text-align:center}.tg-placement #playCard,.tg-placement #manualCard{grid-column:1/-1}


/* The Game 1.0.1 — compatibilite avec la grille native Rulezz.
   Le bloc de parametrage est toujours dans .fields (colonne gauche) et
   #nameGrid reste dans la colonne droite du gabarit de reference.
   Aucun style n'est ajoute au mode Rulezz Test. */
#setup>.tg-setup-fields { grid-template-columns:minmax(0,1fr); gap:12px; min-width:0; }
#setup>.tg-setup-fields>label,
#setup>.tg-setup-fields>p { min-width:0; margin:0; }
#setup>.tg-setup-fields>label>select { width:100%; }

html.rzux-host-desktop-reference #setup {
  grid-template-areas: "count names" "actions actions" "extras extras";
  grid-template-rows: auto auto auto;
}
html.rzux-host-desktop-reference #setup>.tg-setup-fields {
  grid-area:count;
  display:flex!important;
  flex-direction:column!important;
  align-self:start;
  gap:13px!important;
}
html.rzux-host-desktop-reference #setup>#start {
  grid-area:actions;
  min-width:0;
  width:100%;
}
@media(max-width:580px){
  #setup>.tg-setup-fields { display:grid; grid-template-columns:minmax(0,1fr); }
}
