/* Pages moved onto the three shared versions (sizes live in studio-game.css --size-*; this file only places things).
   Rule for every block: a picture sits in a fixed --size-pic box and text goes beside or under it, never on it. */

/* ---- shared pieces ---- */
/* phone and tablet: the desk is as tall as its content (the page scrolls); tablet is one centred column */
@media(max-width:1023px){
 body.sizes-v1{min-height:100dvh}
 body.sizes-v1 .g{height:auto;min-height:0}
 body.sizes-v1 :is(.game-stage,.jp-desk){height:auto;min-height:0;flex:none}
}
@media(min-width:601px) and (max-width:1023px){body.sizes-v1 .g{width:min(94%,720px)}}
.studio-game .size-pic{width:var(--size-pic);height:var(--size-pic);flex:none;display:grid;place-items:center;overflow:hidden;line-height:1}


/* ---- Word chain (shiritori.html): every picture in a fixed box; colour words are a round dot the size of a picture ---- */
body.studio-game[data-jp-kind=shiritori] #grid{grid-template-columns:repeat(var(--size-cols),minmax(0,1fr))}
body.studio-game[data-jp-kind=shiritori] #grid .pic{width:var(--size-pic);height:var(--size-pic);display:grid;place-items:center;margin:0 auto;overflow:hidden}
body.studio-game[data-jp-kind=shiritori] #grid .pic img{width:100%;height:100%;max-height:none;object-fit:contain}
body.studio-game[data-jp-kind=shiritori] #grid .w{font-size:var(--size-jp)}
body.studio-game[data-jp-kind=shiritori] #prev .pic{width:calc(var(--size-pic)*1.4);height:calc(var(--size-pic)*1.4);display:grid;place-items:center;overflow:hidden}
body.studio-game[data-jp-kind=shiritori] #prev .pic img{width:100%;height:100%;max-height:none;object-fit:contain}
body.studio-game[data-jp-kind=shiritori] #grid .pic .swatch{width:calc(var(--size-pic)*.8)!important;height:calc(var(--size-pic)*.8)!important;border-radius:50%!important;border:3px solid #333!important;box-sizing:border-box;font-size:0}
/* chain line and end-of-game line: the dot matches the small chain pictures */
body.studio-game[data-jp-kind=shiritori] .lk .swatch{width:calc(var(--size-pic)*.42)!important;height:calc(var(--size-pic)*.42)!important;border-width:2px!important;box-sizing:border-box;flex:none}
body.studio-game[data-jp-kind=shiritori] #prev .pic .swatch{width:calc(var(--size-pic)*1.12)!important;height:calc(var(--size-pic)*1.12)!important;border-radius:50%!important;border:3px solid #333!important;box-sizing:border-box;font-size:0}
