/* ─── Explorer / Quiz ─── */

/* ─── Layout ─── */
.explorer-container {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(var(--header-height) + 2rem) 1rem 2rem;
  background: linear-gradient(to bottom, #ffffff 0%, #f5f7f0 100%);
}

.quiz-inner {
  max-width: 640px;
  width: 100%;
  margin: auto 0;
}

/* ─── Start Screen ─── */
.quiz-start {
  text-align: center;
  padding: 3rem 2rem;
}

.quiz-start-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 2.5rem;
  font-weight: 600;
  color: #5A6F5E;
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}

.quiz-start-subtitle {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 3rem;
  line-height: 1.8;
}

.quiz-start-btn {
  background: linear-gradient(135deg, #5A6F5E 0%, #7a9a85 100%);
  color: white;
  border: none;
  padding: 1.2rem 3rem;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.45s cubic-bezier(.22,1,.36,1);
  box-shadow: 0 4px 15px rgba(90, 111, 94, 0.3);
}

.quiz-start-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(90, 111, 94, 0.4);
}

/* ─── Progress Step Bar ─── */
.quiz-progress-wrap {
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-weight: 400;
  color: #999;
  letter-spacing: 0.2em;
  margin-bottom: 3rem;
}

/* ─── Question ─── */
.quiz-question-wrap {
  padding: 2rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s cubic-bezier(.22,1,.36,1), transform 0.5s cubic-bezier(.22,1,.36,1);
}

.quiz-question-wrap.show {
  opacity: 1;
  transform: translateY(0);
}

.quiz-question-text {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(1.3rem, 4.5vw, 1.8rem);
  font-weight: 600;
  color: #333;
  text-align: center;
  margin-bottom: 3rem;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

/* ─── Options ─── */
.explorer-container .quiz-options {
  display: grid;
  gap: 1.2rem;
}

.quiz-option {
  padding: 1.8rem 2rem;
  background: white;
  border: 2px solid #e8e8e8;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(.22,1,.36,1);
  font-size: 1.05rem;
  line-height: 1.5;
  color: #333;
  text-align: left;
  position: relative;
  overflow: hidden;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.quiz-option::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(201, 168, 118, 0.1), transparent);
  transition: left 0.5s cubic-bezier(.22,1,.36,1);
}

.quiz-option:hover {
  border-color: #C9A876;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(201, 168, 118, 0.15);
}

.quiz-option:hover::before {
  left: 100%;
}

.quiz-option.selected {
  border-color: #5A6F5E;
  background: linear-gradient(to right, #f5f9f7 0%, #ffffff 100%);
}

/* ─── Results Button ─── */
.results-btn {
  background: linear-gradient(135deg, #5A6F5E 0%, #7a9a85 100%);
  color: white;
  border: none;
  padding: 1.2rem 3rem;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(.22,1,.36,1);
  margin-top: 2rem;
  box-shadow: 0 4px 15px rgba(90, 111, 94, 0.3);
  opacity: 0;
  transform: scale(0.9);
}

.results-btn.show {
  opacity: 1;
  transform: scale(1);
}

.results-btn:hover {
  transform: translateY(-2px) scale(1);
  box-shadow: 0 8px 25px rgba(90, 111, 94, 0.4);
}

/* ─── Loading ─── */
.loading-screen {
  text-align: center;
  padding: 5rem 2rem;
}

.bottle-wrap {
  width: 80px;
  height: 160px;
  margin: 0 auto 3rem;
}

.bottle-animation {
  width: 80px;
  height: 160px;
  position: relative;
  animation: bottle-tremble 0.15s ease-in-out infinite alternate;
}

@keyframes bottle-tremble {
  0% { transform: rotate(-1.5deg) translateY(0); }
  100% { transform: rotate(1.5deg) translateY(-2px); }
}

.bottle-silhouette {
  width: 100%;
  height: 100%;
  position: relative;
}

.bottle-silhouette::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 20px;
  background: rgba(90, 111, 94, 0.7);
  border-radius: 4px 4px 2px 2px;
}

.bottle-silhouette::after {
  content: '';
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 24px;
  background: rgba(90, 111, 94, 0.5);
  border-radius: 2px;
}

.bottle-body {
  position: absolute;
  top: 44px;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 100px;
  background: linear-gradient(135deg, rgba(90,111,94,0.35) 0%, rgba(90,111,94,0.55) 100%);
  border-radius: 6px 6px 10px 10px;
  border: 2px solid rgba(90,111,94,0.5);
  overflow: hidden;
}

.bottle-body::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(180deg, rgba(201,168,118,0.4) 0%, rgba(201,168,118,0.7) 100%);
  animation: liquid-wave 2s ease-in-out infinite alternate;
}

@keyframes liquid-wave {
  0% { height: 55%; }
  100% { height: 65%; }
}

.bottle-body::after {
  content: '';
  position: absolute;
  top: 8px;
  left: 6px;
  width: 8px;
  height: 40px;
  background: rgba(255,255,255,0.25);
  border-radius: 4px;
}

.loading-text {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.2rem;
  color: #5A6F5E;
  font-weight: 600;
  animation: loading-fade 2s ease-in-out infinite;
}

@keyframes loading-fade {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ─── Results ─── */
.results-wrap {
  padding: 3rem 2rem;
}

.results-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 2.2rem;
  font-weight: 600;
  color: #5A6F5E;
  text-align: center;
  margin-bottom: 3rem;
  letter-spacing: 0.05em;
  opacity: 0;
  transform: translateY(24px);
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-section {
  margin-bottom: 3rem;
  opacity: 0;
  transform: translateY(24px);
}

.results-wrap.show .results-title {
  animation: fade-in-up 0.8s cubic-bezier(.22,1,.36,1) both;
}

.results-wrap.show .result-section {
  animation: fade-in-up 0.8s cubic-bezier(.22,1,.36,1) both;
}

.results-wrap.show .result-section:nth-child(2) {
  animation-delay: 0.2s;
}

.results-wrap.show .result-section:nth-child(3) {
  animation-delay: 0.5s;
}

.result-label {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: #5A6F5E;
  margin-bottom: 1rem;
}

.product-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.explorer-container .product-card {
  background: white;
  border: 2px solid #e8e8e8;
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  gap: 1.2rem;
  align-items: center;
  transition: all 0.4s cubic-bezier(.22,1,.36,1);
}

.explorer-container .product-card:hover {
  border-color: #C9A876;
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(201, 168, 118, 0.2);
}

.product-img {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.product-details h3 {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5rem;
}

.product-details p {
  font-size: 1rem;
  color: #666;
}

.explorer-container .quiz-actions {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
  opacity: 0;
  transform: translateY(24px);
}

.results-wrap.show .quiz-actions {
  animation: fade-in-up 0.8s cubic-bezier(.22,1,.36,1) both;
  animation-delay: 0.8s;
}

.btn-secondary {
  background: white;
  color: #5A6F5E;
  border: 2px solid #5A6F5E;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(.22,1,.36,1);
  margin-top: 2rem;
}

.btn-secondary:hover {
  background: #5A6F5E;
  color: white;
}

.hidden {
  display: none !important;
}

/* ─── Responsive ─── */
@media (max-width: 767px) {
  .explorer-container {
    min-height: 100dvh;
    padding: calc(var(--header-height) + 1rem) 0.75rem 1.5rem;
  }

  .quiz-inner {
    margin: auto 0;
  }

  .quiz-start {
    padding: 2rem 1rem;
  }

  .quiz-start-title {
    font-size: 2rem;
  }

  .quiz-start-subtitle {
    font-size: 1rem;
    margin-bottom: 2rem;
  }

  .quiz-start-btn {
    padding: 1rem 2.5rem;
    font-size: 1rem;
  }

  .quiz-progress-wrap {
    margin-bottom: 1.5rem;
  }

  .quiz-question-wrap {
    padding: 0 0.5rem;
  }

  .quiz-question-text {
    font-size: clamp(1.1rem, 4.5vw, 1.4rem);
    margin-bottom: 1.5rem;
  }

  .explorer-container .quiz-options {
    gap: 0.7rem;
  }

  .quiz-option {
    padding: 1rem 1.2rem;
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .results-btn {
    padding: 1rem 2.5rem;
    font-size: 1rem;
    margin-top: 1.5rem;
  }

  .results-wrap {
    padding: 2rem 0.5rem;
  }

  .results-title {
    font-size: 1.6rem;
    margin-bottom: 2rem;
  }

  .result-section {
    margin-bottom: 2rem;
  }

  .result-label {
    font-size: 1rem;
  }

  .explorer-container .product-card {
    flex-direction: column;
    text-align: center;
    padding: 1.2rem;
    gap: 0.8rem;
  }

  .product-img {
    width: 88px;
    height: 88px;
  }

  .product-details h3 {
    font-size: 1.1rem;
  }

  .product-details p {
    font-size: 0.85rem;
  }

  .loading-screen {
    padding: 3rem 1rem;
  }

  .btn-secondary {
    padding: 0.8rem 2rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 374px) {
  .quiz-start-title {
    font-size: 1.6rem;
  }

  .quiz-question-text {
    font-size: 1.05rem;
  }

  .quiz-option {
    padding: 0.8rem 1rem;
    font-size: 0.85rem;
  }

  .product-img {
    width: 72px;
    height: 72px;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .quiz-inner {
    max-width: 680px;
  }
}

@media (min-width: 1024px) {
  .quiz-inner {
    max-width: 720px;
  }
}