.fifteen-page .level-row{display:flex;align-items:center;justify-content:center;gap:8px;margin:10px auto;flex-wrap:wrap}
.fifteen-page .level-row select{padding:6px 10px;max-width:100%}
.slide-board{--n:4;display:grid;grid-template-columns:repeat(var(--n),minmax(0,1fr));grid-template-rows:repeat(var(--n),minmax(0,1fr));gap:5px;width:min(100%,440px, max(160px,calc(100vh - 390px)));width:min(100%,440px,max(160px,calc(100dvh - 390px)));aspect-ratio:1;margin:12px auto}
.slide-board button{min-width:0;min-height:0;padding:0;border:0;font-size:clamp(17px,4vw,29px);font-variant-numeric:tabular-nums;touch-action:manipulation;line-height:1.1}
.slide-board button.blank{background:#102a24;border:1px dashed #45675b;cursor:default}
.slide-board button:disabled{opacity:1;color:#102a24}
@media(max-width:600px){.fifteen-page .level-row{margin:5px auto;gap:5px;font-size:13px}.fifteen-page .level-row select{font-size:13px;padding:5px 6px;min-height:34px}.fifteen-page .slide-board{width:min(100%, max(160px,calc(100vh - 285px)));width:min(100%,max(160px,calc(100dvh - 285px)));gap:4px;margin:8px auto}.fifteen-page .slide-board button{font-size:clamp(16px,5vw,25px)}}

/* A short, wide viewport needs a side-by-side game layout. */
@media (orientation: landscape) and (max-height: 600px) {
 .fifteen-page header{padding:3px 10px;gap:8px;flex-wrap:nowrap;min-height:36px}
 .fifteen-page header nav,.fifteen-page .game-home,.fifteen-page main>.back{display:none}
 .fifteen-page .mobile-back{display:block;font-size:13px;line-height:1.15}
 .fifteen-page #lang{padding:4px 8px;font-size:13px;min-height:30px;max-width:46%}
 .fifteen-page main{padding:3px 8px 5px}
 .fifteen-page footer{display:none}
 .fifteen-page .game{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:repeat(6,auto);column-gap:14px;row-gap:3px;align-items:center;align-content:center;padding:5px 10px}
 .fifteen-page .slide-board{grid-column:1;grid-row:1 / 7;align-self:center;justify-self:center;width:min(100%,440px,calc(100vh - 60px));width:min(100%,440px,calc(100dvh - 60px));margin:0;gap:3px;container-type:inline-size}
 .fifteen-page .slide-board button{font-size:clamp(10px,calc((100vh - 60px) / var(--n) * .52),29px);font-size:clamp(10px,calc(52cqw / var(--n)),29px);border-radius:6px;line-height:1;overflow:hidden}
 .fifteen-page .game h1{grid-column:2;grid-row:1;font-size:clamp(16px,3.5vh,24px);margin:0;line-height:1.1}
 .fifteen-page #task{grid-column:2;grid-row:2;font-size:13px;line-height:1.2;margin:0}
 .fifteen-page .level-row{grid-column:2;grid-row:3;gap:4px;margin:0;font-size:12px}
 .fifteen-page .level-row select{font-size:12px;padding:3px 5px;min-height:28px;max-width:100%}
 .fifteen-page #stats{grid-column:2;grid-row:4;margin:0;font-size:13px;line-height:1.2}
 .fifteen-page #result{grid-column:2;grid-row:5;margin:0;min-height:15px;font-size:12px;line-height:1.15}
 .fifteen-page #again{grid-column:2;grid-row:6;justify-self:center;padding:4px 12px;min-height:30px;font-size:13px}
}
