/* ==========================================================================
   おでん鍋選び診断シミュレーター
========================================================================== */

/* --- カラー --------------------------------------------------------- */
:root {
  --white: #fff;
  --black: #000;
  --brown: #652f0c;
  --gray: #666;
  --m-gray: #b0b0b0;
  --l-gray: #ccc;
  --l-orange: #fbe8d7;
  --orange: #d97119;
  --d-orange: #bf5f12; /* ホバー用(このCSSで追加) */
  --l-yellow: #fff5da;
}
/* --- ボタン共通 --------------------------------------------------------- */
.oden-pot-diagnosis__start-button,
.oden-pot-diagnosis__option,
.oden-pot-diagnosis__back-button,
.oden-pot-diagnosis__product-button,
.oden-pot-diagnosis__retry-button {
  font: inherit;
  cursor: pointer;
}

/* --- 見出し --- */
.oden-pot-diagnosis__title,
.oden-pot-diagnosis__lead,
.oden-pot-diagnosis__question,
.oden-pot-diagnosis__result-title,
.oden-pot-diagnosis__product-name,
.oden-pot-diagnosis__product-desc {
  padding: 0;
  border: 0;
  background: none;
}
.oden-pot-diagnosis__title::before,
.oden-pot-diagnosis__title::after,
.oden-pot-diagnosis__question::before,
.oden-pot-diagnosis__question::after,
.oden-pot-diagnosis__result-title::before,
.oden-pot-diagnosis__result-title::after,
.oden-pot-diagnosis__product-name::before,
.oden-pot-diagnosis__product-name::after {
  content: none;
}

/* --- アニメーション ----------------------------------------------------- */
@keyframes oden-pot-diagnosis-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- 状態 ----------------------------------------------------------------- */
.oden-pot-diagnosis .is-hidden {
  display: none;
}

/* --- Block: 外側 -------------------------------------------------------- */
.oden-pot-diagnosis {
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (max-width: 768px) {
  .oden-pot-diagnosis { padding: 0; }
}

/* --- container-------------------------- */
.oden-pot-diagnosis__container {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 980px;
  height: 460px;
  padding: 40px 60px;
  overflow: hidden;
  background-color: var(--l-orange);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}
@media (max-width: 768px) {
  .oden-pot-diagnosis__container { height: auto; padding: 30px 20px; }
}

/* --- bg ----------------------------------------- */
.oden-pot-diagnosis__bg {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  width: 44%;
  overflow: hidden;
  pointer-events: none;
}
.oden-pot-diagnosis__bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 90% center;
  border-radius: 10px 0 0 10px;
  transform: scale(1.25);
  transform-origin: 80% 95%;
}
/* 写真の端を背景色になじませる(PCは右側、SPは上側) */
.oden-pot-diagnosis__bg-overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-image: linear-gradient(to right, transparent 0%, transparent 50%, var(--l-orange) 80%);
}
@media (max-width: 768px) {
  .oden-pot-diagnosis__bg { top: auto; right: 0; width: auto; height: 195px; }
  .oden-pot-diagnosis__bg-img {
    object-position: center 90%;
    border-radius: 0 0 10px 10px;
    transform: scale(1.4);
    transform-origin: 95% 55%;
  }
  .oden-pot-diagnosis__bg-overlay { background-image: linear-gradient(to bottom, var(--l-orange) 0%, transparent 25%) }
  .oden-pot-diagnosis:has(.oden-pot-diagnosis__result:not(.is-hidden)) {
    background-color: var(--l-orange);
  }
  .oden-pot-diagnosis:has(.oden-pot-diagnosis__result:not(.is-hidden)) .oden-pot-diagnosis__bg {
    display: none;
  }
}
.oden-pot-diagnosis__bg-fallback {
  position: absolute;
  bottom: 8px;
  left: 8px;
  z-index: 0;
  width: 192px;
  height: 192px;
  color: var(--orange);
  opacity: .15;
  pointer-events: none;
}
.oden-pot-diagnosis.is-result .oden-pot-diagnosis__bg {
  width: 100%;
  opacity: .25;
}
.oden-pot-diagnosis.is-result .oden-pot-diagnosis__bg-img {
  border-radius: 10px;
}
.oden-pot-diagnosis.is-result .oden-pot-diagnosis__bg-overlay {
  display: none;
}
.oden-pot-diagnosis.is-result .oden-pot-diagnosis__container {
  padding: 24px 24px 36px;
}
@media (max-width: 768px) {
  .oden-pot-diagnosis.is-result .oden-pot-diagnosis__bg { top: 0; height: 100%; }
  .oden-pot-diagnosis.is-result .oden-pot-diagnosis__bg-img { object-position: 20% center; }
  .oden-pot-diagnosis.is-result .oden-pot-diagnosis__container { padding: 26px 20px 52px; }
}

/* --- start: 診断前の画面 ------------------------------------------------ */
.oden-pot-diagnosis__start {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 0 32px 40%;
  text-align: center;
  animation: oden-pot-diagnosis-fade-in .35s ease-out forwards;
}
@media (max-width: 768px) {
  .oden-pot-diagnosis__start { padding: 8px 0 185px; }
}

.oden-pot-diagnosis__badge {
  margin-bottom: 20px;
  padding: 6px 28px;
  border: 2px dashed var(--orange);
  border-radius: 9999px;
  color: var(--orange);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  background-color: var(--white);
}
.oden-pot-diagnosis__title {
  margin: 0 0 20px;
  color: var(--brown);
  font-size: 40px;
  font-weight: 700;
  line-height: 1.3;
}
@media (max-width: 768px) {
  .oden-pot-diagnosis__title { font-size: 26px; }
}
.oden-pot-diagnosis__title-accent {
  color: var(--orange);
}
.oden-pot-diagnosis__lead {
  margin: 0 0 28px;
  color: var(--brown);
  font-size: 14px;
}
@media (max-width: 768px) {
  .oden-pot-diagnosis__lead { font-size: 16px; }
}

.oden-pot-diagnosis__start-action {
  display: flex;
  justify-content: center;
  width: 100%;
}
.oden-pot-diagnosis__start-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 360px;
  padding: 16px;
  border: 0;
  border-radius: 6px;
  background-color: var(--orange);
  color: var(--white);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
  transition: background-color 200ms;
}
.oden-pot-diagnosis__start-button:hover {
  opacity: .8;
}
.oden-pot-diagnosis__start-button-icon {
  position: absolute;
  top: 50%;
  right: 15px;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
}

/* --- quiz: 診断中の画面 ------------------------------------------------- */
.oden-pot-diagnosis__quiz {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 32px 0 32px 38%;
  animation: oden-pot-diagnosis-fade-in .35s ease-out forwards;
}
@media (max-width: 768px) {
  .oden-pot-diagnosis__quiz { padding: 0 0 50% 0; }
}
/* 1 / 3 の丸 */
.oden-pot-diagnosis__step {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 10px;
  border: 3px solid var(--orange);
  border-radius: 50%;
  color: var(--orange);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  background-color: var(--white);
}
@media (max-width: 768px) {
  .oden-pot-diagnosis__step { width: 58px; height: 58px; font-size: 17px; }
}
/* アイコン + 質問文(横並び・中央) */
.oden-pot-diagnosis__question {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 0 24px;
  color: var(--brown);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
}
@media (max-width: 768px) {
  .oden-pot-diagnosis__question { margin: 0 0 18px; font-size: 24px; }
}
.oden-pot-diagnosis__question-icon {
  display: flex;
  flex-shrink: 0;
}
.oden-pot-diagnosis__question-icon-img {
  width: 50px;
  height: auto;
}
@media (max-width: 768px) {
  .oden-pot-diagnosis__question-icon-img { width: 40px; height: auto; object-fit: contain; }
}

.oden-pot-diagnosis__question-text {
  text-align: left;
  word-break: keep-all;
  text-wrap: balance;
}
@media (max-width: 768px) {
  .oden-pot-diagnosis__question-text {
  word-break: auto-phrase;
  }
}

/* 選択肢の並び(JSが cols-2 / cols-3 を付け替える) */
.oden-pot-diagnosis__options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}
.oden-pot-diagnosis__options--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.oden-pot-diagnosis__options--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 768px) {
  .oden-pot-diagnosis__options { gap: 8px; }
}
/* どれかにマウスを乗せたら、ほかのボタンを薄くする */
/*@media (hover: hover) {
  .oden-pot-diagnosis__options:hover .oden-pot-diagnosis__option:not(:hover) {
    opacity: .4;
  }
}*/

/* 選択肢のボタン */
.oden-pot-diagnosis__option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 120px;
  padding: 12px 16px;
  border: 0;
  border-radius: 10px;
  background-color: var(--orange);
  color: var(--white);
  font-weight: 700;
  text-align: center;
  transition: opacity 150ms;
}
.oden-pot-diagnosis__option:hover {
  opacity: .8;
}
.oden-pot-diagnosis__option:disabled {
  cursor: not-allowed;
  opacity: .5;
}

@media (max-width: 768px) {
  .oden-pot-diagnosis__option { min-height: 96px; padding: 12px 8px; }
}
.oden-pot-diagnosis__option--compact {
  padding-right: 8px;
  padding-left: 8px;
}
.oden-pot-diagnosis__option-label {
  font-size: 28px;
  line-height: 1.4;
}
@media (max-width: 768px) {
  .oden-pot-diagnosis__option-label { font-size: 24px; }
}
.oden-pot-diagnosis__option-note {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
}
@media (max-width: 768px) {
  .oden-pot-diagnosis__option-note { font-size: 13px; }
}

.oden-pot-diagnosis__quiz-back {
  margin-top: 16px;
  text-align: center;
}
.oden-pot-diagnosis__back-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--brown);
  font-size: 14px;
  line-height: 20px;
  text-decoration: underline;
  transition: color 150ms;
}
@media (max-width: 768px) {
  .oden-pot-diagnosis__back-button { font-size: 14px; line-height: 16px; }
}
.oden-pot-diagnosis__back-button:hover {
  color: var(--brown);
}

/* --- result: 診断結果の画面 --------------------------------------------- */
.oden-pot-diagnosis__result {
  position: relative;
  z-index: 10;
  animation: oden-pot-diagnosis-fade-in .35s ease-out forwards;
}
.oden-pot-diagnosis__result-header {
  margin-bottom: 12px;
  text-align: center;
}
@media (max-width: 768px) {
  .oden-pot-diagnosis__result-header { margin-bottom: 20px; }
}
.oden-pot-diagnosis__result-badge {
  display: inline-block;
  margin-bottom: 12px;
  padding: 8px 36px;
  border: 3px dashed var(--orange);
  border-radius: 9999px;
  color: var(--orange);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  background-color: var(--white);
}
@media (max-width: 768px) {
  .oden-pot-diagnosis__result-badge { padding: 6px 30px; font-size: 16px; }
}
.oden-pot-diagnosis__result-title {
  margin: 0;
  text-align: center;
  color: var(--brown);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.4;
  word-break: auto-phrase;
  text-wrap: balance;
}
@media (max-width: 768px) {
  .oden-pot-diagnosis__result-title { font-size: 26px; line-height: 1.2; }
}
.oden-pot-diagnosis__result-title-accent {
  color: var(--orange);
}
.oden-pot-diagnosis__products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 860px;
  margin: 0 auto;
}
@media (max-width: 768px) {
  .oden-pot-diagnosis__products { grid-template-columns: 1fr; }
}
.oden-pot-diagnosis__result-action {
  margin-top: 16px;
  text-align: center;
}
@media (max-width: 768px) {
  .oden-pot-diagnosis__result-action { margin-top: 24px; }
}
.oden-pot-diagnosis__retry-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 360px;
  padding: 14px 48px;
  border: 2px solid var(--orange);
  border-radius: 6px;
  background-color: var(--white);
  color: var(--orange);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
  transition: background-color 150ms;
}
@media (max-width: 768px) {
  .oden-pot-diagnosis__retry-button { max-width: none; }
}
.oden-pot-diagnosis__retry-button:hover {
  background-color: var(--l-orange);
}
.oden-pot-diagnosis__retry-button-icon {
  position: absolute;
  top: 50%;
  right: 20px;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
}

/* --- product: 結果の商品カード(JSが作る) ------------------------------ */
.oden-pot-diagnosis__product {
  display: flex;
  gap: 16px;
  padding: 16px;
  border-radius: 8px;
  background-color: var(--white);
}
.oden-pot-diagnosis__product-thumb {
  display: flex;
  flex: 0 0 48%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  padding: 8px;
  border: 1px solid var(--l-gray);
  border-radius: 4px;
  background-color: var(--white);
  color: var(--gray);
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}
/* 商品画像があるとき */
.oden-pot-diagnosis__product-thumb--image {
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
}
.oden-pot-diagnosis__product-thumb-img {
  display: block;
  width: 100%;
  height: auto;
}
.oden-pot-diagnosis__product-thumb-icon {
  width: 32px;
  height: 32px;
  margin-bottom: 4px;
  color: var(--m-gray);
}
.oden-pot-diagnosis__product-info {
  display: flex;
  flex: 1 1 0%;
  flex-direction: column;
  min-width: 0;
  text-align: left;
}
.oden-pot-diagnosis__product-name {
  display: -webkit-box;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--brown);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}
.oden-pot-diagnosis__product-desc {
  margin: 0 0 12px;
  color: var(--brown);
  font-size: 13px;
  line-height: 1.35;
}
.oden-pot-diagnosis__product-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: auto 0 0;
  padding: 5px 32px;
  border: 0;
  border-radius: 9999px;
  background-color: var(--orange);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  transition: background-color 150ms;
}
.oden-pot-diagnosis__product-button:hover {
  color: var(--white);
  text-decoration: none;
  opacity: .8;
}

.oden-pot-diagnosis__product-button:visited {
  color: var(--white);
  text-decoration: none;
}

.oden-pot-diagnosis__product-button-icon {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
}
/* 幅480px以下:画像を上、文字を下に縦並び */
@media (max-width: 480px) {
  .oden-pot-diagnosis__product { flex-direction: column; gap: 12px; padding: 20px 24px; }
  .oden-pot-diagnosis__product-thumb { flex: none; }
  .oden-pot-diagnosis__product-name { margin: 0 0 10px; font-size: 14px;}
  .oden-pot-diagnosis__product-desc { line-height: 1.4; }
  .oden-pot-diagnosis__product-button { width: 75%; margin: 0 auto; padding: 8px 32px; font-size: 16px; }
  .oden-pot-diagnosis__product-button-icon { right: 14px; }
}
