/* GameFactory · plantilla "bloques@1" — se carga después de sort.css; todo va dentro de .gfb */
.gfb{--cell:40px}
.gfb .gfb-bestmenu{display:flex;align-items:center;gap:6px;margin-top:8px;padding:5px 14px;border-radius:999px;background:rgba(20,8,40,.55);
  border:2px solid rgba(255,255,255,.45);font:800 16px/1 var(--display)}

/* marcador */
.gfb .gfb-score{gap:8px}
.gfb .gfb-score span{font-size:13px;opacity:.85;text-transform:uppercase;letter-spacing:.05em}
.gfb .gfb-score b{font-size:22px}
.gfb .gfb-sub{display:flex;justify-content:space-between;align-items:center;min-height:20px;font:800 14px/1 var(--display);padding:0 4px;text-shadow:0 2px 0 rgba(0,0,0,.35)}
.gfb .gfb-sub>span{display:flex;align-items:center;gap:4px}

/* tablero: 8×8 sin separación, cada celda dibuja su bloque con un margen interno (así la cuenta de posiciones es exacta) */
.gfb .gfb-wrap{position:relative;align-self:center;width:min(100%,440px,calc(100dvh - 330px));min-width:240px}
.gfb .gfb-board{display:grid;grid-template-columns:repeat(8,1fr);aspect-ratio:1;border-radius:16px;overflow:hidden;
  background:rgba(14,6,36,.72);border:3px solid rgba(255,255,255,.4);box-shadow:0 8px 0 rgba(10,4,30,.55),0 14px 30px rgba(0,0,0,.4)}
.gfb .gfb-cell{position:relative;aspect-ratio:1}
.gfb .gfb-cell::before{content:"";position:absolute;inset:2px;border-radius:6px;background:rgba(255,255,255,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.4)}
.gfb .gfb-cell.on::before,.gfb .gfb-piece i::before{background:linear-gradient(rgba(255,255,255,.38),rgba(255,255,255,0) 45%),var(--c);
  box-shadow:inset 0 -4px 0 rgba(0,0,0,.22),inset 0 2px 0 rgba(255,255,255,.45),0 1px 2px rgba(0,0,0,.35)}
.gfb .gfb-cell.pv::before{background:var(--pc);opacity:.45;box-shadow:none}
.gfb .gfb-cell.clr::before{box-shadow:0 0 0 2px #fff,0 0 12px 2px rgba(255,255,255,.7)}
.gfb .gfb-cell.drop::before{animation:gfs-pop .25s ease-out}
.gfb .gfb-cell.boom::before{animation:gfb-boom .32s ease-in forwards}
@keyframes gfb-boom{0%{transform:scale(1);filter:brightness(1)}40%{transform:scale(1.15);filter:brightness(1.8)}100%{transform:scale(.2);opacity:0}}
.gfb .gfb-pts{position:absolute;z-index:5;pointer-events:none;transform:translate(-50%,0);font:800 26px/1 var(--display);color:var(--yellow);
  paint-order:stroke fill;-webkit-text-stroke:4px #fff;text-shadow:0 3px 0 #D9750F;animation:gfb-rise .9s ease-out forwards}
@keyframes gfb-rise{0%{opacity:0;transform:translate(-50%,10px) scale(.6)}20%{opacity:1;transform:translate(-50%,0) scale(1.1)}100%{opacity:0;transform:translate(-50%,-50px) scale(1)}}

/* piezas: en la bandeja chicas, al arrastrar del tamaño del tablero */
.gfb .gfb-piece{--u:min(calc(var(--cell) * .5),22px);display:grid;grid-template-columns:repeat(var(--pw),var(--u));grid-template-rows:repeat(var(--ph),var(--u))}
.gfb .gfb-piece i{position:relative}
.gfb .gfb-piece i::before{content:"";position:absolute;inset:1px;border-radius:4px}
.gfb .gfb-float{position:fixed;left:0;top:0;z-index:50;pointer-events:none;filter:drop-shadow(0 10px 10px rgba(0,0,0,.4))}
.gfb .gfb-float .gfb-piece{--u:var(--cell)}
.gfb .gfb-float .gfb-piece i::before{inset:2px;border-radius:6px}
.gfb .gfb-tray{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;min-height:calc(min(calc(var(--cell) * .5),22px) * 5 + 16px)}
.gfb .gfb-slot{display:grid;place-items:center;border:0;background:rgba(20,8,40,.45);border-radius:16px;padding:8px;touch-action:none;min-width:0}
.gfb .gfb-slot.lifted .gfb-piece{opacity:.2}
.gfb .gfb-slot.nofit .gfb-piece{filter:grayscale(1);opacity:.4}
.gfb .gfb-slot:disabled{background:rgba(20,8,40,.2)}

/* aventura: metas, joyas y quitar línea */
.gfb .btn .dl{display:flex;flex-direction:column;align-items:center;line-height:1.05}
.gfb .btn .dl small{font:700 13px/1.2 var(--body);letter-spacing:0;text-transform:none;opacity:.95}
.gfb .gfb-sub .low{color:#FFB3B3}
.gfb .gfb-kind{display:inline-grid;place-items:center;width:20px;height:20px;border-radius:6px;font:800 14px/1 var(--display);color:#fff;background:#5C7CFA}
.gfb .gfb-kind.k-score{background:#FF9F3A}.gfb .gfb-kind.k-gems{background:#B266F0}
.gfb .lvl .gfb-kind{width:24px;height:24px;font-size:16px;border:2px solid rgba(255,255,255,.85)}
.gfb .gfb-cell.gem::after{content:"";position:absolute;inset:28%;transform:rotate(45deg);border-radius:3px;
  background:linear-gradient(135deg,#fff 0%,#BFF4FF 35%,#41C9F5 70%,#1A7FD1 100%);box-shadow:0 0 6px 2px rgba(255,255,255,.75)}
.gfb .gfb-board.pick .gfb-cell{cursor:pointer}
.gfb .gfb-board.pick .gfb-cell.pk::before{box-shadow:0 0 0 2px #FF5A6E,0 0 10px 2px rgba(255,90,110,.8)}
.gfb .gfo-tool.on .round{box-shadow:0 0 0 4px var(--yellow),0 4px 0 var(--purple-d)}
.gfb .gfb-tools{display:flex;gap:4px;align-items:flex-end}

/* abajo: Mía y cambiar piezas */
.gfb .gfb-bottom{display:flex;align-items:flex-end;justify-content:space-between;gap:8px;min-height:0;flex:1}
.gfb .gfb-bottom .pet-game{width:24%;max-width:110px;height:100%;max-height:120px;min-height:0}
.gfb .gfo-tool{display:grid;justify-items:center;gap:4px;border:0;background:none;padding:0 6px 4px}
.gfb .gfo-tool .round{position:relative;width:50px;height:50px}
.gfb .gfo-tool b{font:800 13px/1.1 var(--display);white-space:nowrap;text-shadow:0 1px 0 rgba(0,0,0,.4)}
.gfb .gfo-cost{position:absolute;right:-12px;top:-9px;display:flex;align-items:center;gap:2px;padding:2px 5px 1px 2px;border-radius:999px;background:#fff;color:var(--ink);
  font:800 11px/1 var(--display);font-style:normal;box-shadow:0 2px 0 rgba(0,0,0,.25)}
.gfb .gfo-cost .coin{width:13px;height:13px}
.gfb .gfo-cost .coin::after{inset:3px;border-width:1px}
.gfb .modal .btn .coin{width:20px;height:20px}
@media (max-height:640px){.gfb .gfb-bottom .pet-game{max-height:80px}.gfb .logo .l1{font-size:52px}.gfb .logo .l2{font-size:40px}}
/* el globo de Mía abajo a la izquierda no debe salirse de la pantalla */
.gfb .gfb-bottom .bubble{left:0;transform:scale(.6);transform-origin:20% 100%}
.gfb .gfb-bottom .bubble.show{transform:scale(1)}
.gfb .gfb-bottom .bubble::after{left:30px}
