@import url("./header.css");
@import url("./anime.css");
@import url("./pbs.css");
@import url("./high.css");

@font-face {
  font-family: "Noto Sans JP";
  src: url("../../assets/fonts/noto-sans-jp-japanese-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans JP";
  src: url("../../assets/fonts/noto-sans-jp-japanese-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ruby-rt-size-min: 0.5rem;
  --ruby-rt-size-fluid: 0.54em;
  --ruby-rt-size-max: 0.7rem;
  --ruby-rt-line-height: 1;
  --font-jp-base: "Hiragino Sans", "Noto Sans JP", sans-serif;
  --font-jp-with-yakuhan: YakuHanJPs, var(--font-jp-base);
}

body {
  background: #fffae6;
  font-family: var(--font-jp-with-yakuhan);
  color: #222;
  font-size: 1rem;
  letter-spacing: 0.04rem;
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;

  &.site-elementary.page-0 {
    background-color: #FFF4A4;
  }

  &.site-junior.page-0 {
    background-color: #C7E3FF;
  }

  &.site-high.page-0 {
    background-color: #C6E7C7;
  }

}

button,
input,
select,
textarea {
  font: inherit;
  font-family: inherit;
}

.ast {
  text-indent: -1em;
  padding-left: 1em;
  display: inline-block;
}

span {
  display: inline-block;
}

ruby {
  ruby-align: space-around;
  font-family: var(--font-jp-base);
}

ruby rt {
  font-size: clamp(var(--ruby-rt-size-min), var(--ruby-rt-size-fluid), var(--ruby-rt-size-max));
  line-height: var(--ruby-rt-line-height);
  font-weight: normal;
  font-family: var(--font-jp-base);
}

.full-width {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.pager-prev,
.pager-next {
  width: 42%;
}

.pager a {
  width: 100%;
  text-align: center;
  display: inline-block;
  padding: 20px 20px;
  background: var(--bs-primary);
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
}

.pager a:hover {
  background: #004c99;
}

.page-title {
  color: var(--bs-primary);
  margin-bottom: 0;
  font-size: 1.25rem;
  font-weight: bold;
  padding: 1.5rem;
  outline: none;
  line-height: 1.6;

  span {
    padding: 0 0.75rem;
    background-color: var(--bs-primary);
    color: #fff;
    border-radius: 0.25rem;
    margin-right: 0.5rem;
  }
}

.cont {
  display: block;
  max-width: 1100px;
  margin: 0 auto;
  background: #ffffff;
  padding: 2rem 1.25rem;
  border-radius: 1rem;
  position: relative;
}

.quiz-cont {
  width: 100%;
  max-width: 960px;
  margin: auto;
  padding: 3rem 2rem;
  border: 4px solid #ff4081;
  border-radius: 20px;
  background-color: #fff;
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: center;

  .question-title {
    font-size: clamp(20px, 2vw, 27px);
    text-align: left;
    margin-bottom: 20px;
  }

  .illustration {
    width: 360px;
    height: auto;
    margin: 1rem;
  }

  .choices {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
  }

  .choice {
    width: 100%;
    padding: 0.9rem 1rem;
    font-size: clamp(16px, 2.4vw, 20px);
    border: 3px solid #ff80ab;
    cursor: pointer;
    background-color: #dcdcdc;
    border-radius: 10px;
    transition: background-color 0.3s;
    margin: 0 0 1.5rem 0;
    white-space: nowrap;
  }

  .choice:hover {
    background-color: #ff80ab;
    color: white;
  }

  .choice.active {
    background-color: #ff80ab;
    color: white;
  }

  .result {
    font-size: 2rem;
    font-weight: bold;
  }
}


.explanation {
  font-size: clamp(16px, 5vw, 20px);
  color: #333;
  margin-top: 15px;
  background-color: #f8f8f8;
  padding: .5rem 1rem;
  border-radius: 10px;
  display: none;
}

.next-button {
  margin-top: 20px;
  padding: 15px;
  font-size: 24px;
  border: none;
  background-color: #ff4081;
  color: white;
  border-radius: 10px;
  cursor: pointer;
  display: none;
}

.main-img {
  display: block;
  margin: auto;
  max-width: 100%;
  height: auto;
  border-radius: 1rem;
}

#map-container {
  position: sticky;
  top: 2rem;
  max-width: 100%;
  width: 600px;
}

#map {
  width: 100%;
  height: auto;
}

.marker {
  position: absolute;
  cursor: pointer;
  width: auto;
  min-width: 50px;
  background-color: white;
  border: 2px solid black;
  text-align: center;
  line-height: 1;
  font-size: 10px;
  font-weight: bold;
  color: black;
  white-space: nowrap;
  padding: 5px;
}

#info-container {
  scroll-margin-top: 1rem;

  img {
    width: 100%;
    height: auto;
    margin-bottom: 0.25rem;
  }

  p {
    font-size: .9rem;
    line-height: 1.4;
    margin-bottom: 1.5rem;

    b {
      display: inline-block;
      margin: .5rem 0;
    }
  }
}


.link-button {
  background-color: #007bff;
  color: white;
  display: inline-block;
  padding: 0.75rem 1.5rem;
  margin: 0.5rem;
  text-align: center;
  text-decoration: none;
  border-radius: .5rem;
  font-size: 1.2rem;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s;

  &:hover {
    background-color: #0056b3;
  }
}

.tax-item {
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(0, 0, 0, .05);
  text-align: center;
  background: rgba(0, 0, 0, .025);

  img {
    width: 200px;
    height: 200px;
    object-fit: contain;
  }

  h5 {
    border-bottom: 1px solid #ccc;
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
  }

  p {
    font-size: 1.05rem;
    line-height: 1.6;
  }
}

.btn-2 {
  background-color: #ff4500;
  color: white;
  width: 100%;
  border: none;
  padding: 10px 15px 6px;
  font-size: 1.1rem;
  border-radius: 0.5rem;
  cursor: pointer;

  &:hover {
    background-color: #ff6347;
  }
}


.tax-answer {
  display: none;
  font-size: 1.25rem;
}

.answer-card {
  background-color: #f9f9ff;
  border: 2px solid #ff8c00;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  text-align: left;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1);
  max-width: 350px;
  margin: 10px auto 0;
}

.answer-title {
  font-size: 1.25rem;
  font-weight: bold;
  color: #ff4500;
}

.answer-text {
  font-size: 1rem;
}

.modal-image {
  cursor: zoom-in;
  transition: .2s;
}

.modal-image:hover {
  opacity: .8;
}

.k30 {
  line-height: 1.5;

  .k30_col:first-child {
    background-color: #FB964B;
    color: #fff;
  }

  .k30_col {
    border: 2px solid #FB964B;
  }
}

.tax-map_title {
  padding: 2rem 1.25rem;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

.tax-map {
  position: relative;
  display: block;
  /* max-width: 980px; */
  /* margin: auto; */
}

.map {
  width: 100%;
  height: auto;
}

.label {
  position: absolute;
  background-color: red;
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: bold;
  cursor: pointer;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}

.lv1 {
  font-size: 10px;
  min-width: 40px;
  text-align: center;
}

.lv2 {
  position: absolute;
  background-color: red;
  color: white;
  padding: .24rem 1rem;
  border-radius: .25rem;
  font-size: 0.86rem;
  font-weight: bold;
  text-align: center;
  min-width: 4rem;
  cursor: pointer;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}

.popup {
  position: fixed;
  background: #fff;
  border: 3px solid #333;
  padding: 14px 16px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  min-width: 240px;
  font-size: 16px;
  line-height: 1.6;
  text-align: left;
  min-height: 80px;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease,
    visibility 0.4s ease;
}

.popupText {
  position: relative;
}

.popup.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.popup.hide {
  animation: fadeOut 0.5s ease-in forwards;
}

.popup2 {
  position: fixed;
  background: #fff;
  border: 3px solid #333;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  padding: 1rem;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease,
    visibility 0.4s ease;

  .popupText {
    aspect-ratio: 1 / 1;
    background: #fff;
    min-height: 80px;
    text-align: center;

    .mb {
      opacity: 0.3;
    }

    .bm {
      opacity: 0.3;
    }
  }
}

.popup2.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.popup2.hide {
  animation: fadeOut 0.5s ease-in forwards;
}


.closeBtn {
  background-color: #333;
  color: #fff;
  position: absolute;
  top: -1rem;
  right: -1rem;
  padding: 0 .5rem;
  border-radius: 20px;
  font-size: 1rem;
  cursor: pointer;
}

.mb {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.1;
  font-weight: bold;
  aspect-ratio: 1 / 1;
  height: 100%;

  &::before {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 0.75rem solid red;
  }
}

.bm {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.1;
  font-weight: bold;
  aspect-ratio: 1 / 1;
  height: 100%;

  &::before {
    content: "";
    display: block;
    width: 100%;
    height: 0.75rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    background-color: red;
  }

  &::after {
    content: "";
    display: block;
    width: 100%;
    height: 0.75rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    background-color: red;
  }
}

.mb2 {
  font-size: 2.4rem;
  /* opacity: 0.55; */
  font-weight: bold;
}

.show-cont {
  display: none;
  scroll-margin-top: 5rem;
}

.show-cont.active {
  display: block;
}

.capture-mode {

  #saveBtn,
  #saveImageBtn {
    display: none;
  }
}

.batu {
  width: 3rem;
  height: 3rem;
  display: block;
  /* background-color: red; */
  /* border-radius: 0.25rem; */
  margin-right: 1rem;
  position: relative;

  &::before {
    content: "";
    display: block;
    width: 100%;
    height: 8px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    /* border-radius: 0.25rem; */
    background-color: red;
  }

  &::after {
    content: "";
    display: block;
    width: 100%;
    height: 8px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    /* border-radius: 0.25rem; */
    background-color: red;
  }

}