/* Desktop keeps the imported tables, colors, dimensions and navigation rows. */
.site-nav td { text-align: center; }
.home main p { text-align: center; }
.home main img { display: block; width: 80%; margin: 0 auto; }
header img { display: block; }
header img, footer img { max-width: 100%; height: auto; }
.markdown-content { text-align: center; }
.markdown-content img { max-width: 100%; height: auto; }
dialog { border: 0; padding: 48px 12px 12px; max-width: 96vw; max-height: 92vh; background: white; }
dialog::backdrop { background: rgb(0 0 0 / .8); }
dialog img { display: block; max-width: 100%; height: auto; }
dialog button { position: absolute; right: 12px; top: 10px; min-height: 32px; cursor: pointer; }
@media (min-width: 761px) and (max-width: 1100px) {
  main table { table-layout: fixed; max-width: 100% !important; width: 100% !important; box-sizing: border-box; }
  main td, main th { width: auto !important; overflow-wrap: anywhere; }
  main img { max-width: 100% !important; height: auto !important; }
}
@media (max-width: 760px) {
  html { overflow-wrap: anywhere; }
  body { margin: 6px; }
  header img { width: auto; }
  nav table.site-nav, nav tbody, nav tr { display: block; width: 100%; box-sizing: border-box; }
  nav tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: #006699; padding: 1px; }
  nav .site-nav td { display: flex; width: auto !important; align-items: center; justify-content: center; padding: 8px 5px; min-width: 0; box-sizing: border-box; }
  nav.books-nav tr > td:last-child:nth-child(odd) { grid-column: 1 / -1; }
  nav a { display: block; width: 100%; line-height: 1.45; }
  nav .menu { font-size: 16px; }
  main table { max-width: 100% !important; width: 100% !important; height: auto !important; box-sizing: border-box; }
  main td, main th { width: auto !important; height: auto !important; max-width: 100%; }
  main img { max-width: 100% !important; width: auto; height: auto !important; object-fit: contain; }
  main .bodyline { padding: 8px; }
  main table:not(.site-nav) > tbody > tr > td:has(img) { display: block; width: 100% !important; box-sizing: border-box; }
  main font[size="7"] { font-size: 28px; }
  main font[size="6"] { font-size: 23px; }
  main font[size="5"] { font-size: 20px; }
  .home main img { width: 100%; }
  footer .foot { line-height: 1.7; }
  footer img { display: block; margin: 0 auto 6px; }
}
@media (max-width: 360px) {
  nav.books-nav tr { grid-template-columns: 1fr; }
}
