body {
  background: #f9f9f9;
}

body,
h1,
h2,
h3,
h4,
p,
ul,
li,
hr,
a,
dl,
dt,
dd,
div,
figure,
figcaption,
footer {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

img {
  max-width: 100%;
  height: auto;
}

li {
  list-style: none;
}

a {
  text-decoration: none;
  color: #222;
  cursor: pointer;
}

a:hover {
  color: #2ad7fa;
}

/*---------------- ヘッダー--------------------*/
header {
  display: flex;
  justify-content: center;
  width: 100%;
}

.headerContent,
#container,
#linkContent,
#underWrap {
  width: 100%;
  max-width: 870px;
}

.headerContent {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.headerContent img {
  width: 50px;
  height: 50px;
  vertical-align: middle;
}

nav {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  margin-bottom: 20px;
}

nav a {
  margin-right: 20px;
}

nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  justify-content: space-around;
}

nav ul li {
  margin-right: 20px;
  display: inline;
  align-items: center;
}

nav ul li:last-child {
  font-size: 0.6rem;
}

#header_container {
  display: flex;
  align-items: flex-start;
}

#header_container img {
  width: 280px;
  height: auto;
  margin-right: 20px;
}

#header_container ul {
  display: flex;
  width: 220px;
  height: 60px;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-top: 4px;
  padding: 0;
}

#header_container li {
  padding: 4px 8px;
  background: #222;
  color: #fff;
  font-size: 0.6rem;
  height: 24px;
  margin: 0 8px 8px 0;
  width: 100px;
  text-align: center;
}

/*---------------- メインコンテンツー--------------------*/
#container {
  display: grid;
  justify-items: center;
  grid-gap: 20px;
  margin: auto;
}

main {
}

section {
  margin-bottom: 20px;
}

#container figure {
  margin: 16px 0;
}
#container h2 {
  margin-top: 48px;
  font-family: 'Kiwi Maru', serif;
}

#container p {
  font-family: 'Kiwi Maru', serif;
}

#container figcaption {
  font-family: 'Kiwi Maru', serif;
  margin-bottom: 20px;
}

#container li {
  font-size: 1.1rem;
}

#container .intention {
  background: #f9da57;
  padding: 4px;
  color: #222222;
  font-weight: bold;
  font-size: 0.8rem;
}

#container .reference {
  background: #5e6af1;
  padding: 4px;
  color: #f2f2f2;
  font-weight: bold;
  font-size: 0.8rem;
}

.paren {
  font-size: 0.8rem;
}

ul#cap {
  font-family: 'Kiwi Maru', serif;
  border-bottom: 2px solid #363636;
  padding-bottom: 15px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-left: 0;
}
ul#cap > li {
  line-height: 1.6em;
  list-style-type: none;
}

ul#cap > li.border {
  border-bottom: 1px dotted #999999;
  margin-bottom: 20px;
}

/*---------------- dlコンテンツ --------------------*/
#dlContent > div {
  display: flex;
  width: 870px;
  justify-content: space-between;
}

#dlContent .details p {
  padding: 16px;
  border: 1px solid #222;
  background: #fff;
  width: 20%;
  text-align: center;
  margin-bottom: 10px;
}

#dlButton {
  width: 40%;
}

#dlContent .details {
  width: 60%;
}

#dlContent .details dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 8px;
  align-items: center;
  margin-top: 16px;
  margin-bottom: 16px;
}

#dlContent .details dt {
  grid-column: 1;
  background: #555;
  color: #fff;
  padding: 10px;
  font-size: 0.8rem;
  text-align: center;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

dt.high-dt {
  height: 80px;
}

#dlContent .details dd {
  grid-column: 2;
}

#dlContent .details figure {
  border-bottom: 2px #222 solid;
  margin-bottom: 16px;
}

#dlContent .details ul {
  margin-right: 16px;
}

#dlContent h4 {
  padding: 16px;
  border: 1px solid #222;
  background: #fff;
  width: 20%;
  text-align: center;
  margin-bottom: 10px;
}

#dlButton a {
  display: block;
  padding: 16px;
  background: #363636;
  color: #fff;
  font-weight: bold;
  font-size: 1.4rem;
  text-align: center;
  margin-bottom: 20px;
}

#dlButton a:hover {
  background: #7b7b7b;
}

/*---------------- navコンテンツ --------------------*/
#navContButtom {
  display: flex;
  margin-top: 20px;
  margin-bottom: 20px;
}

#navContButtom > li {
  margin-right: 20px;
}

/*---------------- linkコンテンツ --------------------*/
#sampleGrid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  width: 870px;
}

#linkContent {
  max-width: 870px;
  width: 100%;
}

#linkContent ul {
  flex-wrap: wrap;
  display: flex;
  justify-content: space-between;
}

#linkContent li {
  margin: 0;
  max-width: 106px;
  width: 100%;
}

/*---------------- アンダーコンテンツ --------------------*/
#underContent,
footer {
  width: 100%;
  box-sizing: border-box;
}

#underContent {
  display: flex;
  justify-content: center;
  background: #f2f2f2;
  margin: 0;
}

#underWrap {
  margin-top: 32px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0 20px;
  flex-wrap: wrap;
}

#underWrap ul,
#underWrap li {
  margin-top: 10px;
}

.column {
  flex: 1; /* 各列が均等な幅になるようにします。*/
  padding: 0 10px; /* 列間にスペースを作ります。*/
}

.twitter-tweet {
  height: 50%;
}

/*---------------- フッター --------------------*/
footer {
  text-align: center;
  padding: 10px 20px;
  background: #fff253;
  color: #666;
  font-size: 0.8rem;
}

#back-to-top {
  position: fixed;
  bottom: 10px;
  right: 10px;
  display: none; /* 初期状態では非表示 */
  padding: 10px;
  background-color: #e4e4e4;
  border: none;
  cursor: pointer;
  width: 40px;
}

/*---------------- 404 --------------------*/

#ja_404,
#en_404 {
  font-family: 'Kiwi Maru', serif;
  text-align: center;
  border: 5px solid #d4d4d4;
  background: #f2f2f2;
  border-radius: 48px;
  padding: 48px;
  margin-top: 160px;
  font-size: 1.6em;
}

/*---------------- ハンバーガーメニュー --------------------*/

.nav-selector {
  display: none;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
}

@media screen and (max-width: 768px) {
  .nav-selector {
    display: block;
  }

  .nav-links {
    display: none;
  }

  select {
    border-radius: 5px;
    padding: 5px 8px;
    border: none;
    box-shadow: none;
    background: #ffff9c;
    background-image: none;
    cursor: pointer;
  }
}
/*---------------- レスポンシブ対応 --------------------*/

/* 869px以下のスクリーンサイズの場合 */
@media screen and (max-width: 869px) {
  .headerContent,
  #container,
  #linkContent,
  #underWrap {
    width: 100%;
    max-width: 869px;
  }

  #dlContent > div {
    width: 100%;
    max-width: 869px;
    flex-direction: column;
  }

  #dlContent .details {
    width: 100%;
  }
  #dlContent #dlButton {
    width: 100%;
    margin-top: 16px;
  }

  #dlContent figure {
    text-align: center;
  }

  #dlContent .details h4,
  #dlContent .details p {
    width: 100%;
  }

  footer {
    width: 100%;
    padding: 10px 0;
  }
}

/* 768px以下のスクリーンサイズの場合 */
@media screen and (max-width: 768px) {
  .headerContent,
  #container,
  #linkContent,
  #underWrap {
    width: 100%;
    max-width: 768px;
  }

  #header_container li {
    width: 96px;
    font-size: 0.6rem;
    margin-right: 0px;
  }

  #container figcaption,
  #container li {
    font-size: 0.9rem;
    line-height: 1.4;
  }

  #dlContent > div {
    width: 100%;
    max-width: 768px;
  }

  #dlContent ul {
    margin-right: 20px;
  }

  #underWrap {
    padding: 0px;
  }

  #underWrap .column h3 {
    font-size: 1rem;
  }

  #underWrap .column ul li {
    font-size: 0.8rem;
  }

  .column {
    padding: 0 4px; /* 列間にスペースを作ります。*/
  }
  footer {
    width: 100%;
  }
}

/* 460px以下のスクリーンサイズの場合 */
@media screen and (max-width: 460px) {
  .headerContent,
  #container,
  #linkContent,
  #underWrap {
    width: 100%;
    max-width: 460px;
  }

  #header_container li {
    display: none;
    width: 64px;
    font-size: 0.1rem;
  }

  #container figcaption,
  #container li {
    font-size: 0.8rem;
    line-height: 1.4;
  }

  #dlContent > div {
    width: 100%;
    max-width: 460px;
  }
  #dlContent > div .details li {
    font-size: 0.6rem;
  }
  #underWrap {
    padding: 0px;
  }
  #underWrap .column h3 {
    font-size: 1rem;
  }
  #underWrap .column ul li {
    font-size: 0.8rem;
  }
  #underWrap li {
    margin-bottom: 20px;
  }

  nav select {
    width: 70%;
  }
  footer {
    width: 100%;
  }
}

/* 390px以下のスクリーンサイズの場合 */
@media screen and (max-width: 390px) {
  .headerContent,
  #container,
  #linkContent,
  #underWrap {
    width: 100%;
    max-width: 390px;
  }
  #header_container li {
    display: none;
    width: 64px;
    font-size: 0.1rem;
  }

  #container section figure figcaption {
    font-size: 0.6rem;
  }

  #dlContent > div {
    width: 100%;
    max-width: 390px;
  }
  nav select {
    width: 50%;
  }

  #underWrap {
    flex-direction: column;
  }

  #underWrap.column {
    width: 100%;
  }

  footer {
    width: 100%;
  }
}
