@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;
  max-width: 680px;
  margin: 1.5rem auto;
}

.oq-card {
  position: relative;
  background: #ffffff;
  border: 2px solid #ffccd5;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  color: #333333;
}

.oq-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, #ff007f 0%, #ff5c8a 100%);
  padding: 14px 20px;
  text-align: center;
}

.oq-title {
  flex: 1;
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
  margin: 0;
  padding: 0;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.oq-toggle-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(208, 241, 62, 0.281);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.oq-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.oq-container {
  position: relative;
  padding: 20px;
  box-sizing: border-box;
}

.oq-card.is-collapsed .oq-container {
  display: none;
}

@media (max-width: 480px) {
  .oq-container {
    padding: 14px;
  }
}

.oq-count {
  margin: 0 0 12px;
  padding: 0;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.5;
  color: #FF007F;
  text-align: center;
}

.oq-howto {
  background: #fff5f8;
  border: 1px solid #ffd1e0;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 15px;
  line-height: 1.6;
  color: #FF007F;
  text-align: center;
  margin-bottom: 20px;
}

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

.oq-label {
  font-size: 22px;
  font-weight: bold;
  color: #FF007F;
  text-align: center;
  line-height: 1.4;
  margin: 0 0 12px 0;
  padding: 0 4px;
}

.oq-oppai-img {
  max-width: 100% !important;
  width: 240px !important;
  height: auto !important;
  border-radius: 12px;
  box-shadow: 0 4px 14px 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;
  color: #FF007F;
  text-align: center;
}

.oq-card.is-result-visible .oq-question,
.oq-card.is-result-visible .oq-choices {
  filter: brightness(0.94);
  pointer-events: none;
}

.oq-card.is-result-compact .oq-oppai-img {
  max-height: 72px !important;
  width: auto !important;
}

.oq-card.is-result-compact .oq-label {
  font-size: 17px;
  margin-bottom: 8px;
}

.oq-result {
  position: absolute;
  z-index: 10;
  top: 50%;
  left: 50%;
  width: min(92%, 440px);
  max-height: min(78dvh, 100%);
  box-sizing: border-box;
  margin: 0;
  text-align: center;
  padding: 20px 16px;
  border-radius: 12px;
  background: #ffffff;
  border: 2px solid #ff7aa8;
  color: #111;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.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-rate {
  font-size: 16px;
  font-weight: bold;
  color: #ff5c8a;
  margin: 0 0 12px;
}

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

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

.oq-card.is-result-compact .oq-answer-package-img {
  max-width: 200px;
}

.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;
}
