:root {
  --text-color: rgba(0, 0, 0, 0.7);
  --title-color: #7ACC1D;
  --background-color: rgb(253, 255, 220);
  --title-font: 'Dela Gothic One', sans-serif;
}

/* ベーススタイル */
html {
  height: 100%;
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 900;
  background-color: #ffffff;
  color: var(--text-color);
  margin: 0;
  padding: 0;
  height: 100%;
}

img {
  width: 100%;
  height: auto;
}

section {
  margin: 0 auto 3rem;
  padding: 2rem;
  max-width: 70rem;
}

.top-page h2 {
  font-family: var(--title-font);
  color: var(--title-color);
  text-align: center;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

button {
  background-color: transparent;
  border: none;
  cursor: pointer;
  outline: none;
  padding: 0;
  appearance: none;
}

p {
  margin: 0;
}

.stalker {
  display: none;
}

header {
  right: 0;
}

/* 最初はメニューを隠す（モバイル用） */
.logo {
  z-index: 99;
  position: fixed;
  top: 25px;
  left: 20px;
}
.logo img {
  width: 50px;
}

#header-menu.open {
  display: flex;
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
  padding-top: 5rem;
}

#header-menu li a {
  padding: 0.8rem 0 0 1rem;
  display: inline-block;
}

nav a {
    color: var(--text-color);
  }

#header-menu li {
  list-style: none;
}

/* black-bg(ハンバーガーメニュー解除用bg) */
.black-bg {
  position: absolute;
  left: 0;
  top: 0;
  width: 100vw;
  background-color: #000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s;
  cursor: pointer;
  z-index: 298;
}

.black-bg.open {
  opacity: 0.3;
  visibility: visible;
}

/* ハンバーガーアイコン */

.hamburger {
  border: var(--text-color) 1px solid;
  padding: 12px 10px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  position: fixed;
  top: 20px;
  right: 20px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 18px;
  transition: 0.3s ease;
  z-index: 300;
}

.hamburger span {
  display: block;
  height: 3px;
  background: var(--title-color);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
  position: relative;
}

#header-menu {
  position: fixed;
  top: 0px;
  right: 0;
  width: 200px;
  background: #fff;
  padding: 1em;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
  z-index: 299;
}

/* X状態に変化 */
.hamburger.open span:nth-child(1) {
  transform: rotate(45deg);
  top: 7px;
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg);
  top: -7px;
}

@media screen and (min-width: 835px) {
  header {
    width: 30%;
    position: fixed;
    display: flex;
    right: 0;
    border-radius: 30px;
    border: 1px solid rgba(0, 0, 0, 1);
    top: 10px;
    margin: auto;
    right: 2%;
    z-index: 999;
    background-color: #fff;
    padding: 0.7rem 1.7rem;
  }

  #header.scrolled {
    background-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
  }

  #header-menu {
    transform: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    position: static;
    flex-direction: row;
    background: none;
    box-shadow: none;
    width: auto;
    height: auto;
    padding: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;

  }

  #header-menu li {
    flex: 1;
    text-align: center;
  }

  #header-menu li:first-child {
    padding-left: 10px;
    text-align: left;
  }

  #header-menu li:last-child {
    padding-right: 10px;
    text-align: right;
  }

  #header-menu li a {
    line-height: 1rem;
    padding: 0;
    border-bottom: none;
  }

  .hamburger {
    display: none;
  }

  .stalker {
    display: block;
    height: 50px;
    /* 画像の高さ */
    left: -25px;
    /* widthの半分 */
    opacity: 0;
    /* カーソルを画面内に入れるまでは透明 */
    pointer-events: none;
    /* 直下のリンクをクリック可能にする */
    position: fixed;
    /* スクロールしてもカーソルの位置で固定 */
    top: -25px;
    /* widthの半分 */
    transition: transform .3s ease-out;
    /* 遅れてついてくる時間 */
    width: 50px;
    /* 画像の幅 */
    z-index: 999;
  }

  /* .stalker img {
    width: 100%;
  } */
}

/* nav */
nav {
  margin: 0 auto;
}

nav ul {
  padding: 0;
  margin: 0 auto;
}

nav a {
  text-decoration: none;
  font-weight: bold;
}

@media screen and (max-width: 767px) {
  nav {
    left: -220px;
    width: 220px;
  }
}

@media screen and (min-width: 835px) {
  nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 0;
  }

  nav a {
    color: var(--text-color);
  }

  nav li::after {
    border-right: 1.5px solid #FDFCE9;
  }
}


/* トップページ */

/* h2 */
.top-page h2::before {
  margin-right: 0.7rem;
  content: '';
  display: inline-block;
  background-repeat: no-repeat;
  background-size: contain;
  vertical-align: middle;
  margin-bottom: 0.3rem;
}

#character-search {
  margin-top: 1rem;
  margin-bottom: 0;
  position: relative;
  text-align: center;
}

#search-input {
  border: none;
  width: 60%;
  padding: 0.6rem;
  font-size: 1rem;
  border-radius: 25px;
  background-color: rgba(120, 120, 128, 0.16);
  color: rgba(150, 150, 150, 1);
  border: 2px solid #ffffff;
}

.label {
  margin-bottom: 2rem;
}

.search-img {
  width: 70%;
  position: absolute;
  margin: auto;
  left: 0;
  right: 0;
  bottom: 0;
}

#search-input:focus {
  outline: 0;
  border: 2px solid #ebb813;
}

section#gara {
  margin: 0 auto 0;
  padding: 0;
  max-width: none;
}

.gara {
  width: 100%;
  height: 40px;
  /* 高さはお好みで */
  overflow: hidden;
  position: relative;
}

#gara {
  width: 200%;
  /* 横に2倍の幅を持たせて繰り返し感を出す */
  height: 100%;
  background-image: url("img/img_gara.png");
  background-repeat: repeat-x;
  background-size: auto 100%;
  animation: scrollGara 60s linear infinite;
}

@keyframes scrollGara {
  from {
    background-position: 0 0;
  }

  to {
    background-position: -1440px 0;
  }
}

input::placeholder {
  color: rgba(150, 150, 150, 1);
}

section#top {
  margin: 0 auto 0;
}

.bg {
  background-image: url(img/main_bg.png);
  background-size: contain;
}

#char-image {
  animation: slideIn 1s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

#top h1 {
  font-family: var(--title-font);
  color: #FDFCE9;
  margin-top: 0;
  font-size: 3rem;
}

#top .main_wrapper {
  display: flex;
  flex-direction: column;
}

#top .main_wrapper .main-left {
  order: 1;
  text-align: center;
}

#top .main_wrapper .main-right {
  order: 0;
  text-align: center;
}

#top .main_wrapper .main-right  img{
  border-radius: 3.5rem;
}

#top .main_wrapper .main-left .button_wrapper {
  margin-top: 3rem;
}

#top .main_wrapper .main-left button {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 900;
  padding: 0.3rem 0.2rem;
  border-radius: 7px;
  background-color: #fff;
  margin-right: 0.4rem;
  border: var(--title-color) 2px solid;
}

#top .main_wrapper .main-left button a {
  display:inline-block;
  padding: 0.3rem 0.2rem;
  min-width: 6rem;
}

#top .scroll_down {
  display: none;
}

#top .scroll_down a {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.8rem;
  font-weight: normal;
  color: #fff;
  position: absolute;
  bottom: 150px;
  left: 50%;
  display: block;
  background-size: 14px auto;
  z-index: 2;
  text-decoration: none;
  transform: translate(-50%, -13vh);
}

#top .scroll_down a:before {
  position: absolute;
  top: calc(50% + 24px);
  left: calc(50% - 8px);
  transform: rotate(-45deg);
  display: block;
  width: 12px;
  height: 12px;
  content: "";
  border: 2px solid #fff;
  border-width: 0px 0 2px 2px;
  animation: bounce 2s linear infinite;
}

#top .scroll_down a:after {
  position: absolute;
  width: 32px;
  height: 32px;
  border: 2px solid #fff;
  content: "";
  border-radius: 50%;
  top: calc(50% + 16px);
  left: calc(50% - 19px);
}

@keyframes bounce {

  0%,
  100%,
  20%,
  50%,
  70%,
  80% {
    -webkit-transform: translateY(0)rotate(-45deg);
    -ms-transform: translateY(0)rotate(-45deg);
    transform: translateY(0)rotate(-45deg);
  }

  40% {
    -webkit-transform: translateY(-8px)rotate(-45deg);
    -ms-transform: translateY(-8px)rotate(-45deg);
    transform: translateY(-8px)rotate(-45deg);
  }

  60% {
    -webkit-transform: translateY(-4px)rotate(-45deg);
    -ms-transform: translateY(-4px)rotate(-45deg);
    transform: translateY(-4px)rotate(-45deg);
  }
}

@keyframes slideIn {
  0% {
    transform: translateX(40px);
    opacity: 0;
  }

  100% {
    transform: translateX(0);
  }

  40%,
  100% {
    opacity: 1;
  }
}


@media (min-width: 835px) {
  #top .main_wrapper {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    height: 70vh;
  }

  #top .main_wrapper .main-left {
    margin-left: 3rem;
    order: 0;
    text-align: start;
  }

  #top .main_wrapper .main-right {
    order: 1;
    display: contents;
    text-align: end;
  }

  #top .main_wrapper .main-right img {
    width: 40%;
  }

  #top .scroll_down {
    display: block;
  }

  .search-img {
    width: 45%;
  }

  #top {
    padding-top: 60px;
  }
}

/* カードスタイル */
.card-container {
  margin: 0 auto;
}

.card {
  max-width: 15rem;
  padding: 1.3rem;
  border-radius: 8px;
  transition: transform 0.2s;
  margin: 0 auto;
}

.card .img-wrapper img {
  background-color: rgb(253, 255, 220, 1);
  border-radius: 1rem;
  border: var(--title-color) 1.5px solid;
}

.card p.scenario {
  color: var(--title-color);
}

.card h3 {
  font-weight: 900;
}

.card p.des {
  color: rgba(0, 0, 0, 0.5);
}

.card:hover {
  transform: scale(1.02);
  border-color: #e9d32f;
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

a {
  text-decoration: none;
  color: var(--text-color);
}

#line {
  background-image: url("img/img_path2.png");
  background-repeat: no-repeat;
  background-size: contain;
  width: 80%;
}

@media (min-width: 600px) {
  .card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    justify-content: space-between;
  }
}

@media (min-width: 835px) {

  #line {
  background-image: url("img/img_path.png");
  }

  #character-preview,
  #characters {
    margin: 0 auto;
  }

  #character-preview {
    width: 60%;
  }
}

section#today1d100 {
  margin: 0;
  max-width: none;
  background-color: var(--background-color);
}

#today1d100 h2 {
  padding: 0;
  margin-bottom: 1rem;
}

#today1d100 .container {
  text-align: center;
  width: 100%;
}

#today1d100 .container #result {
  font-size: 3rem;
  font-family: var(--title-font);
  transition: transform 0.2s ease;
  height: 3rem;
  padding-bottom: 0.5rem;
}

#today1d100 .container #result.animate {
  transform: scale(1.2);
}

#today1d100 .container #message {
  margin: 2rem 0;
  transition: opacity 0.4s ease;
}

#today1d100 .container #message.fade-out {
  opacity: 0;
}

#today1d100 .container #message.fade-in {
  opacity: 1;
}

#today1d100 .container #message p {
  padding: 3rem 1rem;
  background-color: #fff;
  font-size: 1.5rem;
  color: var(--title-color);
  border-radius: 10px;
  border: var(--title-color) 1.5px solid;
}

#today1d100 .container #roll {
  font-weight: 900;
  color: #fff;
  background-color: var(--title-color);
  padding: 0.6rem 1rem;
  border-radius: 25px;
  transform: 0.2s;
}

#today1d100 .container #roll:hover {
  transform: scale(1.03);
}

#today1d100 .img_wrapper {
  margin-top: 4rem;
  margin-bottom: 4rem;
  text-align: center;
  width: 100%;
}

#today1d100 img {
  width: 60%;
  max-width: 250px;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-direction: alternate;
  animation-duration: 1.5s;
  animation-name: anim_v;
}

@keyframes anim_v {
  0% {
    transform: translate(0, -20px);
  }

  100% {
    transform: translate(0, 20px)
  }
}

@media (min-width: 835px) {
  #today1d100 {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  #today1d100 .container {
    width: 35%;
  }

  #today1d100 .img_wrapper {
    width: 30%;
    margin-top: 0;
    margin-bottom: 0;
  }

}

/* キャラクター詳細ページ */

.character a {
  font-weight: 700;
}

.cursor {
  cursor: pointer;
}

/* 左側 */

.char-date {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.char-date span {
  margin-left: 2rem;
}

.char-date strong {
  color: var(--title-color);
}

.char-ste {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding-bottom: 1.8rem;
}

.iachara p {
  color: #999999;
  margin-top: 0.6rem;
  font-size: 0.8rem;
}

#char-url a{
  font-weight: 900;
  border: 2px solid var(--title-color);
  padding: 0.2rem 1rem;
  border-radius: 50px;
}

.char-description {
  padding-bottom: 2rem;
  border-bottom: var(--title-color) solid 1px;
}

.block-voice {
  padding-top: 2rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  position: relative;
  display: flex;
  border-top: 1px solid var(--title-color);
}

.btn-image {
  display: flex;
  width: 95%;
  justify-content: space-between;
}

.btn-wrapper {
  display: flex;
}

#view-image:hover {
  transform: rotate(0.02turn);
}

#view-image img {
  vertical-align: bottom;
}

.block-name  {
  margin: 2rem 0 1.5rem;
}

.block-name a {
  border: 1px solid var(--title-color);
  border-radius: 20px;
  padding: 0.2rem 1.2rem;
  color: var(--title-color);
}

p.arrow-a {
  position: relative;
  display: inline-block;
  padding-left: 12px;
}

p.arrow-a::before {
  content: '';
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 6px 8px 6px 0;
  border-color: transparent var(--title-color) transparent transparent;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  margin: auto;
}

.character h2 {
  text-indent: -0.1em;
  color: var(--text-color);
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 900;
  margin: 0;
  font-size: 2.1rem;
}

.character #char-scenario {
  margin: 2rem 0 0.5rem;
  color: var(--title-color);
  font-size: 1.2rem;
}

.character #char-hurigana {
  color: #999999;
  font-size: 0.7rem;
}


.voice-button p.arrow-s {
  position: relative;
  vertical-align:  middle;
  padding-left: 7px;
}

.voice-button p.arrow-s::before {
  content: '';
  background-image: url(img/Icon_voice.png);
  background-size: cover;
}

.voice-button {
  font-weight: 900;
  font-size: 0.7rem;
  border-radius: 20px;
  text-align: center;
  padding: 0.5rem 0.4rem;
  margin: 0.5rem;
  align-items: center;
  background-color: var(--title-color);
  color: #ffffff;
  transition: transform 0.2s;
}

.voice-button img {
  width: 30px;
  padding-left: 0.4rem;
}

.voice-button:hover {
  transform: scale(1.03);
  border-color: #e9d32f;
}

.voice-text {
  margin-top: 1rem;
  height: 10rem;
  color: var(--text-color);
  border-bottom: 1px solid var(--title-color);
}



/* 右側 */
.btn-content {
  position: relative;
}

.btnWrapper {
  display: flex;
  width: 100%;
  justify-content: center;
  position: absolute;
  z-index: 98;
  bottom: 10px;
}

#char-image {
  width: 100%;
  padding-top: 1rem;
  background-image: url(/img/chara_bg.png);
  background-size: cover;
  border-radius: 20px;
}

#character-detail button {
  display: block;
}

#voices {
  display: flex;
}

.btn {
  transition: transform 0.2s;
}

.btn:hover {
  transform: scale(1.04);
}

.btn:not(:last-child) {
  margin-right: 0.5rem;
}

.btn img {
  width: 40px;
}



@media screen and (min-width: 835px) {

  .block {
    padding: 3% 2% 0 5%;
    display: flex;
  }

  .block-right {
    order: 2;
  }

  .block-left {
    width: 55%;
    order: 1;
    margin-right: 7%;
  }

  .char-date {
    margin-top: 0;
    margin-bottom: 1rem;
  }

  .char-ste {
    width: 80%;
  }

  .char-description {
    margin: 1.5rem 0;
  }

  #char-url a:hover {
  transform: scale(1.04);
}

  .btn {
    margin-bottom: 0.5rem;
  }

}

@media (min-width: 425px) {
  .voice-button {
    display: flex;
  }

}

/* フッター */
footer {
  background-image: url(img/footer_bg.png);
  background-size: contain;
  color: #FEFDEA;
  padding: 3rem 0;
  align-items: center;
}

footer .footer_left {
  width: 70%;
  font-size: 0.6rem;
  font-weight: 400;
  margin: 0 auto;
}

footer .footer_right {
  width: 70%;
  margin: 0 auto;
}

footer .footer_right ul {
  list-style: none;
  padding-left: 0;
}

footer .footer_right li {
  font-weight: 400;
  font-size: 0.7rem;
  margin-bottom: 8px;
}

footer .footer_right li a {
  color: #fff;
}

footer .footer_right img {
  width: 40px;
}

@media (min-width: 835px) {
  footer {
    display: flex;
    justify-content: space-around;
    background-image: url(img/footer_bg.png);
    background-size: contain;
    color: #FEFDEA;
    padding: 3rem 0;
    position: sticky;
    top: 100vh;
    align-items: center;
  }

  footer .footer_left {
    width: 70%;
  }

  footer .footer_right ul {
    display: flex;
    list-style: none;
    justify-content: end;
    margin-right: 3rem;
  }

  footer .footer_right li {
    margin-left: 3rem;
  }

  footer p {
    padding: 0 3rem;
    max-width: 70rem;
  }
}