@import "./styles/loading.css";
@import "./styles/sakura.css";
@import "./styles/aug.css";
@import "./styles/dec.css";
@import "./styles/transition.css";

body {
  font-family: "Kiwi Maru";
  background-color: #e8e9dd;
  overflow: hidden;
  user-select: none;
  margin: 0;
}

.ui-widget {
  font-family: "Kiwi Maru";
}

main {
  height: 100lvh; /*モバイルのアドレスバー対策。効かなければvhに戻す 231030ね*/
}

input:-internal-autofill-selected {
  /*background: inherit;*/
  /*オートフィルで埋めるとブラウザの規定のcssに負けてしまうので色が変わらない*/
}

#bg,
#bg1,
#bg2,
#bg-1 {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: center center no-repeat;
}

#bg-1 {
  z-index: -1;
}

#bg {
  z-index: 0;
}

#bg1 {
  z-index: 1;
  opacity: 0;
}

#bg2 {
  z-index: 2;
  opacity: 0;
}

#block-clear-back {
  background: transparent;
}

#block-clear-back > img {
  opacity: 0.3;
}

#block-clear {
  color: white;
  width: 100%;
  height: 100%;
  padding: 0 12px 36px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: absolute;
  transition: all 1s;
}

/*object-fit:cover;のimgに合わせて要素を配置するためのガイド
aspect-ratioを個別に設定すること*/
#guide-outer {
  width: 50vw;
  height: auto;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  margin: auto;
  padding: 0;
  /*border: 5px solid red;*/
}

#guide-inner {
  width: auto;
  height: 50vh;
  min-height: 100%;
  margin: 0;
  padding: 0;
  position: relative;
  /*border: 5px solid yellow;*/
}

#nazo {
  position: relative;
  z-index: 10;
  min-height: 100vh;
}

#nazo.bg-white {
  background: white;
}

#story {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
}

#top-frame {
  display: flex;
  justify-content: flex-start;
  width: 1160px;
  max-width: 100%;
  align-items: end;
}

#name {
  background-image: url("./images/name.webp");
  background-size: cover;
  width: 225px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.4rem;
  margin-right: auto;
  filter: drop-shadow(4px 4px 4px);
}

/*クラス指定ない状態で実質.normalと同じになるように*/
#message-frame {
  z-index: 10;
  width: 90vw;
  height: 25vh;
  margin: 10px 30px;
  padding: 30px;
  background-image: linear-gradient(
    0deg,
    rgba(64, 72, 72, 0.7),
    rgba(160, 169, 172, 0.7),
    rgba(160, 169, 172, 0)
  );
  border-radius: 20px;
}

#message-frame.normal {
  width: 90vw;
  height: 25vh;
  margin: 10px 30px;
  padding: 30px;
  background-image: linear-gradient(
    0deg,
    rgba(64, 72, 72, 0.7),
    rgba(160, 169, 172, 0.7),
    rgba(160, 169, 172, 0)
  );
  border-radius: 20px;
}

#message-frame.full {
  width: 1160px;
  height: 100vh;
  max-width: 100%;
  color: white;
  background-image: none;
}

#message {
  display: block;
  position: relative;
  max-width: 80%;
  text-align: center;
  top: 25%;
  left: 50%;
  transform: translate(-50%, -25%);
  font-size: 1.2rem;
  opacity: 1;
}

#message_progress {
  position: fixed;
  width: 60%;
  bottom: 20px;
  left: 50%;
  transform: translate(-50%, -50%);
}

#sound,
#skip,
#log {
  cursor: pointer;
  margin-right: 1rem;
}

#backToSelect {
  cursor: pointer;
}

#title {
  height: 100vh;
  color: white;
  display: flex;
  justify-content: center;
  align-content: center;
  align-items: center;
}

#title > img {
  max-width: 90vw;
}

#stage-select {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  width: 100vw;
  height: 330vw;
  min-height: 100vh;
  align-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

div.select-wrapper-outer {
  position: absolute;
  width: 30vw;
  height: 30vw;
  display: flex;
  justify-content: center;
  align-items: center;
}

div.select-wrapper {
  width: 30vw;
  height: 30vw;
  max-width: 250px;
  max-height: 250px;
  aspect-ratio: 1;
  position: relative;
  animation: soft-shake 10s infinite;
}

div.glow {
  position: absolute;
  z-index: -1;
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background-color: #ffffff99;
  filter: blur(20px);
}

#stage-select img {
  width: 100%;
  height: 100%;
  cursor: pointer;
}

div.select-dashed {
  border: 1vw dashed white;
  border-radius: 50%;
  min-width: 10vw;
  min-height: 10vw;
  position: absolute;
  z-index: -5;
}

div.select-dashed.curve-1 {
  width: 109vw;
  aspect-ratio: 1;
  top: 23vw;
  left: -35vw;
}

div.select-dashed.curve-2 {
  width: 121vw;
  aspect-ratio: 1;
  top: 98vw;
  left: 42vw;
}

div.select-dashed.curve-3 {
  width: 340vw;
  aspect-ratio: 1;
  top: 97vw;
  left: -272vw;
}

div#dashed-op-feb {
  clip-path: polygon(50% 0%, 50% 50%, 100% 0);
}

div#dashed-feb-apr {
  clip-path: polygon(100% 50%, 50% 50%, 100% 0);
}

div#dashed-apr-jul {
  clip-path: polygon(100% 50%, 50% 50%, 100% 100%);
}

div#dashed-jul-aug {
  clip-path: polygon(0 0, 50% 50%, 0 50%);
}

div#dashed-aug-sep {
  clip-path: polygon(0 50%, 50% 50%, 0 75%);
}

div#dashed-sep-dec {
  clip-path: polygon(100% 40%, 50% 50%, 100% 23%);
}

div#dashed-dec-mar {
  clip-path: polygon(100% 40%, 50% 50%, 100% 60%);
}

.blur {
  animation-name: blurAnime;
  animation-duration: 1s;
  animation-fill-mode: forwards;
}

.accordion {
  max-width: 1024px;
  margin: 0 auto;
}

.accordion .accordion_header {
  background-color: #a0a9ac;
  color: #fff;
  padding: 0.5rem 0;
  margin-bottom: 1rem;
  text-align: center;
  position: relative;
  cursor: pointer;
  transition-duration: 0.2s;
}

.accordion .accordion_header:hover {
  opacity: 0.8;
}

.accordion .accordion_header .i_box {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 50%;
  right: 5%;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  box-sizing: border-box;
  -webkit-transform: rotate(45deg);
  transform: rotate(45deg);
  transform-origin: center center;
  transition-duration: 0.2s;
}

.accordion .accordion_header .i_box i {
  display: block;
  width: 18px;
  height: 18px;
  -webkit-transform: rotate(45deg);
  transform: rotate(45deg);
  transform-origin: center center;
  transition-duration: 0.2s;
  position: relative;
}

.accordion .accordion_header.open .i_box {
  -webkit-transform: rotate(-360deg);
  transform: rotate(-360deg);
}

.accordion .accordion_header .i_box i:before,
.accordion .accordion_header .i_box i:after {
  display: flex;
  content: "";
  background-color: #fff;
  border-radius: 10px;
  width: 18px;
  height: 4px;
  position: absolute;
  top: 7px;
  left: 0;
  -webkit-transform: rotate(0deg);
  transform: rotate(0deg);
  transform-origin: center center;
}

.accordion .accordion_header .i_box i:before {
  width: 4px;
  height: 18px;
  top: 0;
  left: 7px;
}

.accordion .accordion_header.open .i_box i:before {
  content: none;
}

.accordion .accordion_header.open .i_box i:after {
  -webkit-transform: rotate(-45deg);
  transform: rotate(-45deg);
}

.accordion .accordion_inner {
  display: none;
  padding: 0 1rem 1rem;
  box-sizing: border-box;
}

.accordion .accordion_inner .profile {
  display: flex;
}

.accordion .accordion_inner p {
  margin: 0;
}

.accordion .accordion_inner img {
  margin-right: 10px;
  position: relative;
}

.nav {
  position: absolute;
  right: 0;
  top: 0;
}

.drawer_hidden {
  display: none;
}

.drawer_open {
  display: flex;
  height: 60px;
  width: 60px;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 100;
  cursor: pointer;
}

.drawer_open span,
.drawer_open span:before,
.drawer_open span:after {
  content: "";
  display: block;
  height: 3px;
  width: 25px;
  border-radius: 3px;
  background: #333;
  transition: 0.5s;
  position: absolute;
}

.drawer_open span:before {
  bottom: 8px;
}

.drawer_open span:after {
  top: 8px;
}

#drawer_input:checked ~ .drawer_open span {
  background: rgba(255, 255, 255, 0);
}

#drawer_input:checked ~ .drawer_open span::before {
  bottom: 0;
  transform: rotate(45deg);
}

#drawer_input:checked ~ .drawer_open span::after {
  top: 0;
  transform: rotate(-45deg);
}

.nav_content {
  width: 60px;
  height: 100%;
  position: fixed;
  top: 0;
  right: -61px;
  z-index: 99;
  background: #ffffffcc;
  transition: 0.5s;
  padding: 60px 0 0 0;
}

.nav_list {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.nav_item > #sound,
.nav_item > #log {
  margin: 0;
}

#drawer_input:checked ~ .nav_content {
  right: 0;
}

.nav img {
  position: relative;
}

@media screen and (max-width: 1024px) {
  .accordion_header {
    font-size: 18px;
  }
  .accordion_header .i_box {
    width: 30px;
    height: 30px;
    margin-top: -15px;
  }
}

@media screen and (max-width: 767px) {
  .accordion .accordion_header {
    font-size: 16px;
    text-align: left;
    padding: 15px 60px 15px 15px;
  }
}

@keyframes blurAnime {
  from {
    filter: blur(0.1rem);
    opacity: 0;
  }

  to {
    filter: blur(0);
    opacity: 1;
  }
}

@media screen and (max-width: 599px) {
  #message-frame {
    padding: 25px;
  }

  #message-frame.normal {
    padding: 25px;
  }

  #sound,
  #skip,
  #log {
    margin-right: 0.5rem;
  }

  #sound,
  #skip,
  #log,
  #backToSelect {
    width: 40px;
  }

  #message {
    font-size: 1rem;
    max-width: 100%;
  }

  #name {
    width: 180px;
    height: 45px;
    font-size: 1.2rem;
  }

  .ui-widget {
    font-size: 1rem;
  }

  #bg,
  #bg1,
  #bg2,
  #bg-1 {
    height: 50%;
    top: 10vh;
  }

  #message-frame.full > #message {
    top: 40%;
    max-width: 90%;
  }
}

@media screen and (max-width: 375px) {
  #message-frame {
    height: 20vh;
    padding: 20px;
  }

  #message-frame.normal {
    height: 20vh;
    padding: 20px;
  }

  #message {
    font-size: 0.8rem;
  }

  #name {
    width: 150px;
    height: 40px;
    font-size: 1rem;
  }

  #sound,
  #skip,
  #log,
  #backToSelect {
    width: 32px;
  }

  .ui-widget {
    font-size: 1rem;
  }
}
