@charset "UTF-8";

:root {
  color-scheme: light;
}
html, body, div#wrapper {
  height: 100%;
  min-height: 100%;
}

/* 横長で使用 */
html {
  width: 100vw;
  height: 100vh;
  overflow: hidden auto;
}
body {
  width: 100vw;
  margin: 0;
  padding: 0;
  overflow: hidden;
}
#wrapper {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: auto;
}
@media screen and (orientation:portrait) {
  #_wrapper {
    transform: rotate(90deg);
    width: 100dvh;
    height: 100dvw;
    margin: -100vw 0 100vh;

    transform-origin: left bottom;
  }
  _footer {
    display: none;
  }
}

img {
  vertical-align: top;
}
body.puzzle {
  background-image: url(../images/puzzle/bg.png);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
footer {
  padding: .3em 20px;
  background: #4b65f0;
  color: #ffffff;
  text-align: center;
}
input, textarea {
  padding: .3em .5em;
  border-radius: 5px;
}

.content-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.header {
  display: grid;
  position: relative;
  /* max-width: 960px; */
  margin-right: auto;
  margin-left: auto;

  grid-template-columns: 268px 1fr 40px;
  column-gap: 20px;
}
.header h1 {
  width: 268px;
  height: 150px;
  overflow: hidden;
  background-image: url(../images/puzzle/logo.png);
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  text-indent: 100%;
  white-space: nowrap;

  aspect-ratio: 268 / 150;
}
.header .subtitle {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding-bottom: 10px;
  font-weight: 700;
  font-size: 30px;
}
.header .icon-area {
  display: flex;
  align-items: flex-end;
  padding-bottom: 10px;
}
.header .icon-area .icon_help {
  display: block;
  width: 40px;
  height: 40px;
  overflow: hidden;
  overflow: hidden;
  border-radius: 50%;
  background-image: url(../images/icon_help.png);
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  text-indent: 100vw;
  white-space: nowrap;
  cursor: pointer;
}
@media screen and (max-width: 900px) and (min-width: 601px) {
  .header {
    grid-template-columns: calc((100% - 40px - 40px) * .4) calc((100% - 40px - 40px) * .6) 40px;
  }
  .header .subtitle {
    font-size: clamp(20px, 3.33vw, 30px);
    letter-spacing: -2px;
  }
}
@media screen and (max-width: 840px) {
  .header h1 {
    width: 31.78vw;
    height: 17.85vw;
  }
}
@media screen and (max-width: 600px) {
  .header {
    grid-template-columns: 1fr 40px;
  }
  .header .subtitle {
    font-size: 20px;

    grid-column: 1 / 3;
  }
  .header .icon-area {
    grid-row: 1 / 2;
    grid-column: 2 / 3;
  }
}

.canvas {
  display: grid;
  /* max-width: 960px; */
  margin-right: auto;
  margin-left: auto;
  overflow: hidden;
  border: 3px solid #4367bf;
  border-radius: 10px;
  background-color: #ffffff;
  /* grid-template-columns: 1fr 1.657fr 1fr; */
  /* grid-template-columns: 28.125% 43.75% 28.125%; */

  grid-template-columns: calc(28.125% - -2px) 43.75% calc(28.125% - -2px);
  grid-template-rows: 1fr 1fr;
  aspect-ratio: 16 / 9;
}
.canvas .parts-panel {
  cursor: pointer;
}
.canvas .area-head {
  display: flex;
  align-items: center;
  border-right-width: 1px;
  border-right-style: dotted;

  grid-column: 1 / 2;
  grid-row: 1 / 3;
}
.canvas .area-back {
  display: flex;
  align-items: end;
  border-bottom-width: 1px;
  border-bottom-style: dotted;

  grid-column: 2 / 3;
  grid-row: 1 / 2;
}
.canvas .area-belly {
  display: flex;
  align-items: start;

  grid-column: 2 / 3;
  grid-row: 2 / 3;
}
.canvas .area-tail {
  display: flex;
  align-items: center;
  border-left-width: 1px;
  border-left-style: dotted;

  grid-column: 3 / 4;
  grid-row: 1 / 3;
}

.canvas .area-head img {
  margin-left: auto;

  transform-origin: right center;
}
.canvas .area-tail img {
  margin-right: auto;

  transform-origin: left center;
}
.canvas img {
  position: relative;
}

.information {
  /* max-width: 960px; */
  margin-right: auto;
  margin-left: auto;
}
.information .container {
  margin-top: 20px;
}
.information h2 {
  margin-bottom: 10px;
  color: #4367bf;
  font-size: 20px;
  text-shadow: #ffffff 2px 0, #ffffff -2px 0, #ffffff 0 -2px, #ffffff 0 2px, #ffffff 2px 2px, #ffffff -2px 2px, #ffffff 2px -2px, #ffffff -2px -2px, #ffffff 1px 2px, #ffffff -1px 2px, #ffffff 1px -2px, #ffffff -1px -2px, #ffffff 2px 1px, #ffffff -2px 1px, #ffffff 2px -1px, #ffffff -2px -1px;
}
.information input, .information .textarea, .information textarea {
  padding: .3em .5em;
  border: 1px solid #4367bf;
  border-radius: 5px;
  background-color: #ffffff;
}
.information .features .textarea {
  border-color: transparent;
}
.information .features .textarea > div + div {
  margin-top: .5em;
}
.information .features .textarea span::before {
  font-weight: 700;
}
.information .features .textarea .head span::before {
  content: "食べ物や食べかた：";
}
.information .features .textarea .back span::before {
  content: "行動：";
}
.information .features .textarea .belly span::before {
  content: "生息地：";
}
.information .features .textarea .tail span::before {
  content: "むれやくらしかた：";
}
.information textarea {
  height: 7em;
}
@media screen and (max-width: 600px) {
  .information h2 {
    font-size: 18px;
  }
}

.btn-area {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  margin: 30px auto 20px;

  gap: 20px;
}
.btn-area a {
  display: block;
  width: fit-content;
  height: fit-content;
  margin: 0 auto;
  padding: .6em 2em;
  border-width: 2px;
  border-style: solid;
  border-color: #fcde98;
  border-radius: 10em;
  background: #ffe89a;
  color: #666666;
  font-weight: 700;
  white-space: nowrap;
}


#parts-select, #tutorial {
  display: flex;
  align-items: center;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: #000a;
}
#parts-select .parts-container {
  align-items: center;
  position: relative;
  max-width: 960px;
  margin-right: auto;
  margin-left: auto;
  padding: 20px;
  padding: 20px;
  background-color: #ffffff;
}
#parts-select ul {
  display: flex;
  flex-wrap: wrap;
  max-height: calc(100vh - 120px);
  overflow: scroll;

  gap: 10px;
}
#parts-select ul li {
  width: 100px;
  border: 1px solid #cccccc;

  aspect-ratio: 1/1;
}
#parts-select ul li img {
  width: 100%;
  height: 100%;
  cursor: pointer;

  object-fit: cover;
}
#parts-select .close {
  position: absolute;
  top: -20px;
  right: -20px;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border-radius: 50px;
  background-image: url(../images/common/icon_close.svg);
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  background-color: #ffffff;
  text-indent: 100vw;
  white-space: nowrap;
  cursor: pointer;
}
#tutorial .dialog-content {
  position: relative;
  width: 100%;
  max-width: 960px;
  margin-right: auto;
  margin-left: auto;
  padding-left: 10px;
  padding-right: 10px;
}
#tutorial .slide-container {
  background-color: #fff;
  border-radius: 10px;
  padding: 20px;
}
#tutorial figure {
  min-width: 300px;

  aspect-ratio: 3/2;
}
#tutorial figure img {
  background-color: #ffffff;
}
#tutorial .comment {
  margin-top: 10px;
  padding-left: 50px;
  padding-right: 50px;
  text-align: justify;
}
#tutorial .item-title {
  font-weight: 700;
  margin-bottom: 10px;
  display: block;
}
#tutorial .close {
  margin-top: 10px;
  display: block;
  width: 30px;
  height: 30px;
  margin-right: auto;
  margin-left: auto;
  overflow: hidden;
  border-radius: 50px;
  background-image: url(../images/common/icon_close.svg);
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  background-color: #ffffff;
  text-align: center;
  text-indent: 100vw;
  white-space: nowrap;
  cursor: pointer;
}
#tutorial .slick-prev,
#tutorial .slick-next {
  top: initial;
  bottom: 0px;
  width: 40px;
  height: 40px;
  z-index: 10;
}
#tutorial .slick-prev::before,
#tutorial .slick-next::before {
  color: #666666;
  font-size: 40px;
}
#tutorial .slick-prev {
  left: 20px;
}
#tutorial .slick-next {
  right: 20px;
}
@media screen and (min-width: 1001px) {
  #parts-select ul li {
    width: calc((100% / 6) - 10px / 6 * 5);
  }
}
@media screen and (max-width: 1000px) {
  #parts-select {
    padding: 20px;
  }
  #parts-select ul {
    /* justify-content: center; */
  }
  #parts-select ul li {
    width: calc((100% / 5) - 10px / 5 * 4);
    width: 130px;
  }
}
@media screen and (max-width: 600px) {
  #parts-select ul li {
    width: calc((100% / 3) - 10px / 3 * 2);
  }
}
@media screen and (orientation:portrait) {
  /* #parts-select ul li {
    width: calc((100% / 6) - 10px / 6 * 5);
  } */
}

.full-screen {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}
.tg-backdrop-hide {
  width: 0;
  height: 0;
}
.tg-dialog-hide {
  /* display: none; */
  opacity: 0;
}
