/* ===== embed ===== */
.embed-page {
  width: 100%;
}

.embed-outer {
  position: relative;
  width: min(90vw, 480px);
  margin: 0 auto;
  padding: 4rem 0 6rem;
}

.embed-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4.38;
  margin: 1rem 0 0;
  background-color: transparent;
  overflow: hidden;
  border: 4px solid #ef0f8a;
  box-shadow: 4px 4px 0 #ef0f8a;
  z-index: 2;
}

.embed-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: transparent;
}

@media screen and (min-width: 1px) and (max-width: 743px) {
  .embed-stage {
    aspect-ratio: 3 /4.38;
    border: 3px solid #ef0f8a;
    box-shadow: 3px 3px 0 #ef0f8a;
    max-height: 90svh;
  }
}

@media screen and (min-width: 744px) and (max-width: 1024px) {
  .embed-stage {
    aspect-ratio: 3 / 4;
  }
}

/* ===== utility ===== */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  cursor: pointer;
  user-select: none;
}

.btn[disabled] {
  opacity: .5;
  cursor: not-allowed;
}

/* ===== start ===== */
.start {
  width: 100%;
  height: 100%;
  background-image: url(../img/bg-quiz.jpg);
  background-repeat: no-repeat;
  background-position: top left;
  background-size: auto 100%;
  background-color: #fff688;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.start-inner {
  width: 80%;
}

.start h1 {
  width: 100%;
  margin: 0 auto 2rem;
  text-align: center;
}

.button {
  display: block;
  line-height: 1.2;
}

.button p.tap {
  font-size: 70%;
}

/* ===== quiz ===== */
.quiz {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 1rem;
  background: #fff;
}

.quiz h2 {
  margin: 0 0 0.3em;
  font-size: 4.6vw;
  font-weight: 700;
}

/* 第n問 + 進捗 */
#qNo {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

#qProgress {
  font-size: 3.6vw;
  color: #666;
}

.quiz .lead {
  height: 3em;
  font-size: 3.6vw;
  line-height: 1.4;
  color: #222;
}

.em {
  font-weight: 900;
}

/* image */
.quiz .qimg {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #eee;
  margin: 2% 0 3%;
  background-image: url(../img/loading.png);
  background-size: cover;
}

.quiz .qimg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: 1px solid #000;
}

/* options grid (2x2) */
.options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 4%;
}

.option-btn {
  aspect-ratio: 1 / 0.29;
  border: 2px solid #ef0f8a !important;
  box-shadow: 3px 3px 0 #ef0f8a;
  background-color: #fff;
  font-weight: 700;
  font-size: min(3.6vw, 16px) !important;
  color: #ef0f8a;
  letter-spacing: -0.05em;
  padding: 0.5em;
  line-height: 1.4;
}

.option-btn.is-selected {
  border: 2px solid #4c37ff !important;
  box-shadow: 0 0 0 #4c37ff;
  color: #fff;
  background-color: #4c37ff;
  transform: translate(3px, 3px);
}

@media screen and (max-width: 743px) {
  .option-btn {
    width: 100%;
    min-width: 0;
    aspect-ratio: 1 / 0.32;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  body.is-q3 .option-btn {
    font-size: min(3.1vw, 14px) !important;
  }

  .option-btn.btn {
    justify-content: flex-start;
    text-align: left;
  }
}

/* answer button */
.answer-btn {
  width: 100%;
  aspect-ratio: 1 / 0.12;
  border: 2px solid #4c37ff !important;
  box-shadow: 2px 2px 0 #4c37ff;
  font-weight: 700;
  color: #4c37ff;
  font-size: min(4vw, 20px) !important;
  position: relative;
  background-color: #fff;
  background-image: url(../img/arrow.png);
  background-repeat: no-repeat;
  background-position: center right 15px;
  background-size: 2.5% auto;
}

.answer-btn[disabled] {
  border: 2px solid #ccc !important;
  box-shadow: 2px 2px 0 #ccc;
  color: #ccc;
  background-image: url(../img/arrow-off.png);
}

.dev {
  position: absolute;
  width: 100%;
  top: 5px;
  right: 5px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

a.dev-btn {
  display: inline-block;
  margin: 0 0 0 1rem;
  color: #fff;
  font-size: 12px;
  padding: 0.3em 1em;
  background-color: rgba(76, 55, 255, 0.5);
}