/* Compact (cover screen) + narrow-phone rules for the raw super_battleship
   clients (classic / ocean / rogue / how-to). Classes come from site/fold-core.js. */
/* ---------- any narrow phone: never scroll sideways ---------- */
@media (max-width: 600px) {
  .col, .boardwrap, .boardcol, .sidecol { min-width: 0 !important; flex-basis: 100% !important; }
  .wrap { padding-left: 8px !important; padding-right: 8px !important; }
}
html.lay-compact, html.lay-compact body { overflow-x: hidden; max-width: 100%; }

/* ---------- super_battleship (classic / ocean / rogue / how-to) ---------- */
html.lay-compact #mh-topbar { padding: 4px 6px; font-size: 12px; }
html.lay-compact #mh-topbar a { padding: 4px 6px; }
html.lay-compact .wrap { padding: 6px 6px 40px; }
html.lay-compact h1 { font-size: 17px; }
html.lay-compact .card { padding: 8px; border-radius: 10px; }
html.lay-compact .row, html.lay-compact .boards { flex-direction: column; gap: 8px; }
html.lay-compact .col, html.lay-compact .boardwrap, html.lay-compact .boardcol,
html.lay-compact .sidecol { min-width: 0 !important; flex: 1 1 auto !important; width: 100%; }
/* boards: square, as big as the screen allows */
html.lay-compact .grid:has(.cell) { padding: 3px; gap: 1px; width: min(100%, 100vh - 60px); margin: 0 auto; }
html.lay-compact .cell { font-size: 10px; border-radius: 2px; }
html.lay-compact .cell .lbl { display: none; }
html.lay-compact canvas { width: min(100%, 100vh - 60px) !important; height: auto !important; margin: 0 auto; }
/* controls stack, big taps */
html.lay-compact .btns, html.lay-compact .actions, html.lay-compact .tech, html.lay-compact .topbar {
  flex-direction: column; align-items: stretch; }
html.lay-compact .btns button, html.lay-compact .actions button, html.lay-compact .tech button {
  width: 100%; flex: 1 1 auto; min-height: 40px; }
html.lay-compact .scard { width: 100% !important; }
html.lay-compact .log { height: 110px; }
