body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: linear-gradient(45deg, #f0bc68 0%, #f0bc68 50%, #c4d7d1 50%, #c4d7d1 100%);
  background-size: 100vw 100vh;
  background-color: #f0bc68;
  background-repeat: round;
}
.siteheader {
  font-size: 16px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background-color: #333;
  color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
body > *:not(header) {
  position: relative;
  top: 60px;
}

.logo {
  font-size: 1.5em;
  font-weight: bold;
}
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end; /* 右端に寄せる */
  margin: 10px;
  padding: 0 10px;
  width: auto; /* 幅の自動調整 */
}
nav .menu {
  position: relative;
  white-space: nowrap;
}
nav a {
  color: #fff;
  text-decoration: none;
  font-size: 1em;
  padding: 5px 10px;
}
nav a:hover {
  text-decoration: underline;
}
.submenu {
  font-size: 1em;
  display: none;
  position: absolute;
  top: 100%;
  left: auto;
  right: 0; /* 右端から表示 */
  background-color: #444;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
  padding: 5px 0;
  z-index: 100;
  min-width: 120px;
  max-width: 200px; /* 最大幅の制限 */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.submenu a {
  display: block;
  padding: 6px 12px;
  color: #fff;
  text-decoration: none;
  font-size: 0.85em;
  left: 0;
}
.submenu a:hover {
  background-color: #555;
}
.menu:hover .submenu {
  display: block;
}
.submenu {
  display: none;
  position: absolute;
  top: 100%;
  background-color: #444;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
  padding: 5px 0;
  z-index: 100;
  min-width: 120px;
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.menu:hover .submenu {
  display: block;
}

nav .menu:last-child .submenu {
  left: auto;
  right: 0; /* 右端に合わせる */
}
@media (max-width: 600px) {
  nav {
    flex-direction: column;
    gap: 5px;
  }
}
main {
    padding: 80px 20px 20px;
    width: 95%;
    margin: 1% auto;
    background-color: #eee;
    border-radius: 1em;
}
section {
    margin-bottom: 30px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}


a[mainlink] {
/* 下線消したりサイズの指定 */
  position: relative;
  display: inline-block;

  text-decoration: none;

  width: 100%;
  height: 4em;
  max-width: 600px;

  vertical-align: top; /* 上端揃え */

  text-align: center;
  vertical-align: middle; /* 縦方向の基準を揃える */
  line-height: 4em;      /* 高さと同じ値を設定（縦方向の中央揃え） */

  transition: .3s;
}

a[mainlink]::after{
  position: absolute;
  bottom: 0;
  left: 50%;
  content: '';
  width: 0;
  height: 2px;
  background-color: #31aae2;
  transition: .3s;
  transform: translateX(-50%);
}

a[mainlink]:hover::after{
  width: 100%;
}


div[mainlinkdiv]{
  display: inline-block;
  position: relative;
  top: 0;
  width: 35%;
  height: 4em;
  max-width: 600px;
  min-width: 180px;
  margin: 2.5%;
  padding: 0;
  border-top: dotted 2px #111;
}


div[mainlinkdiv]:before, div[mainlinkdiv]:after{ 
    position: absolute;
    top: 0;
    content:'';
    width: 10px;
    height: 100%;
    display: inline-block;
    box-sizing: border-box;
}
div[mainlinkdiv]:before{
    border-left: dotted 2px #111;
    border-bottom: dotted 2px #111;
    left: 0;
}
div[mainlinkdiv]:after{
    border-right: dotted 2px #111;
    border-bottom: dotted 2px #111;
    right: 0;
}
a {
  color: #0033cc;
  text-decoration: none;
  transition: color 0.3s;
}
a:hover{
  color : #ff7043;
}
a:active{
  color : #26a69a;
}
.game,
.tool,
.others {
  width: 50%;
}
h1,h2 {
  border-bottom: solid 3px #cce4ff;
  position: relative;
}

h1:after,
h2:after {
  position: absolute;
  content: " ";
  display: block;
  border-bottom: solid 3px #5472cd;
  bottom: -3px;
  width: 20%;
}