@import url('https://fonts.googleapis.com/css2?family=M+PLUS+Rounded+1c:wght@400;700;800&display=swap');

#oppai-quiz-app {
  font-family: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif;
}

.oq-container {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  padding: 16px;
  box-sizing: border-box;
}

.oq-howto {
  background: #fff5f8;
  border: 1px solid #ffd1e0;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 17px;
  line-height: 1.6;
  color: #333;
  margin-bottom: 16px;
}

.oq-question {
  text-align: center;
  margin-bottom: 20px;
}

.oq-label {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 12px;
}

.oq-oppai-img {
  max-width: 100% !important;
  width: 240px !important;
  height: auto !important;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.oq-choices {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 600px) {
  .oq-choices {
    grid-template-columns: repeat(4, 1fr);
  }
}

.oq-choice-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 2px solid #eee;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, filter 0.2s, opacity 0.2s, transform 0.2s;
}

.oq-choice-btn:hover:not(:disabled) {
  border-color: #ff7aa8;
  box-shadow: 0 10px 22px rgba(255, 92, 138, 0.28);
  transform: translateY(-7px);
}

.oq-choices:has(.oq-choice-btn:hover:not(:disabled)) .oq-choice-btn:not(:hover) {
  filter: brightness(0.88) saturate(0.8);
  opacity: 0.72;
}

.oq-choice-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.oq-choice-btn.is-selected {
  opacity: 1;
  border-color: #ff5c8a;
  box-shadow: 0 0 0 3px rgba(255, 92, 138, 0.3), 0 12px 28px rgba(255, 92, 138, 0.35);
  filter: brightness(1.12) saturate(1.15);
  transform: translateY(-5px) scale(1.02);
}

.oq-choice-btn.is-dimmed {
  opacity: 0.28;
  filter: brightness(0.62) saturate(0.7);
}

.oq-choice-thumb {
  width: 100% !important;
  aspect-ratio: 5 / 7;
  overflow: hidden;
  border-radius: 6px;
  background: #f2f2f2;
  line-height: 0;
}

/* パッケージ画像の右側を中心にクロップして表示する（テーマの img{max-width/height:auto} 上書き対策で !important を付与） */
.oq-choice-thumb img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
  object-position: right center !important;
}

.oq-choice-name {
  font-size: 16px;
  font-weight: bold;
  text-align: center;
}

.oq-result {
  position: absolute;
  z-index: 2;
  top: 58%;
  left: 50%;
  width: min(90%, 420px);
  box-sizing: border-box;
  margin: 0;
  text-align: center;
  padding: 16px;
  border-radius: 10px;
  background: #f8f8f8;
  color: #111;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
}

@media (max-width: 599px) {
  .oq-result {
    top: 68%;
  }
}

.oq-result.is-visible {
  animation: oq-result-rise 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.oq-result-step-1,
.oq-result-step-2,
.oq-result-step-3,
.oq-result-step-4 {
  opacity: 0;
  transform: translateY(10px);
  animation: oq-result-step-in 0.35s ease-out forwards;
}

.oq-result-step-1 { animation-delay: 0s; }
.oq-result-step-2 { animation-delay: 0.3s; }
.oq-result-step-3 { animation-delay: 0.6s; }
.oq-result-step-4 { animation-delay: 0.9s; }

@keyframes oq-result-rise {
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes oq-result-step-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.oq-result-text {
  font-size: 26px;
  font-weight: bold;
  margin-bottom: 12px;
}

.oq-streak {
  font-size: 18px;
  font-weight: bold;
  color: #ff5c8a;
  margin: -4px 0 12px;
}

.oq-work-guide {
  color: #ff5c8a;
  font-weight: bold;
}

.oq-answer-info img {
  max-width: 280px;
  width: 100%;
  box-sizing: border-box;
  border: 3px solid #ff5c8a;
  border-radius: 8px;
  margin: 8px 0;
}

.oq-answer-link a {
  color: #5bbce8;
  font-weight: 800;
}

.oq-next-btn {
  margin-top: 12px;
  padding: 10px 24px;
  font-size: 18px;
  font-weight: bold;
  color: #fff;
  background: #ff5c8a;
  border: none;
  border-radius: 24px;
  cursor: pointer;
}

.oq-next-btn:hover {
  background: #ff3d75;
}
