@charset "UTF-8";

/* Conservative typography rules. Image navigation and banner dimensions are preserved. */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  color: #334155;
  font-family: Meiryo, "Yu Gothic", sans-serif;
  line-height: 1.75;
}

body p,
body li,
body dt,
body dd {
  color: #334155;
  font-family: Meiryo, "Yu Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.75;
}

body h1 {
  color: #075985;
  font-family: Meiryo, "Yu Gothic", sans-serif;
  font-size: 24px;
  line-height: 1.45;
}

body h2 {
  color: #087fbd;
  font-family: Meiryo, "Yu Gothic", sans-serif;
  font-size: 22px;
  line-height: 1.5;
}

body h3 {
  color: #087f8c;
  font-family: Meiryo, "Yu Gothic", sans-serif;
  font-size: 18px;
  line-height: 1.55;
}

body a {
  color: #0077b6;
}

/* Keep existing image navigation; add a modest rollover cue. */
#side-menu a img,
table a img {
  transition: filter 0.15s ease, opacity 0.15s ease;
}

#side-menu a:hover img,
#side-menu a:focus img {
  filter: brightness(1.12) contrast(1.08);
  opacity: 0.94;
}

.hands-smile {
  color: #0077b6 !important;
  font-family: Meiryo, "Yu Gothic", sans-serif !important;
  font-size: 18px !important;
  font-weight: 700;
  letter-spacing: 0;
  text-align: center;
}

/* index.html: keep the desktop banner and category positions stable. */
#page {
  box-sizing: border-box;
}

#main-table {
  table-layout: fixed;
}

#side-cell {
  box-sizing: border-box;
}

#content-cell {
  box-sizing: border-box;
}

@media screen and (max-width: 520px) {
  body h1 { font-size: 20px; }
  body h2 { font-size: 20px; }
  body h3 { font-size: 17px; }

  #side-cell {
    display: block !important;
    box-sizing: border-box;
    width: 100% !important;
    padding: 8px 0 14px !important;
  }

  #side-menu {
    display: table !important;
    width: 100% !important;
    max-width: 376px;
    margin-right: auto;
    margin-left: auto;
  }

  #side-menu > tbody {
    display: grid;
    grid-template-columns: repeat(2, 180px);
    justify-content: center;
    gap: 4px 8px;
  }

  #side-menu > tbody > tr,
  #side-menu > tbody > tr > td {
    display: block;
    width: 180px !important;
    height: auto !important;
    padding: 0 !important;
  }

  #side-menu > tbody > tr:first-child,
  #side-menu > tbody > tr:nth-child(even) {
    grid-column: 1 / -1;
    justify-self: center;
  }
}

@media screen and (max-width: 380px) {
  #side-menu > tbody {
    grid-template-columns: 180px;
  }
}
