/* quiz.css — 有獎徵答浮層 + 首頁 banner。自成一套、與其他浮層不衝突。 */

/* ── 茶葉專欄頁入口（桌機/手機分開設計）── */
/* 桌機：導覽列強調膠囊 */
.art-quiz-dt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #3a5a44;
  color: #fff !important;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.art-quiz-dt:hover {
  background: #2f4b3c;
}
.art-quiz-dt:active {
  transform: scale(0.97);
}
/* 手機：底線導覽字＋小標籤 */
/* .art-quiz-mb 已退役（2026-07-03 專欄手機 header 重做——徵答入口改進漢堡選單 .art-menu-item） */

/* ── 首頁 banner ── */
/* 第三批 UX⑭（2026-07-03）：banner 收斂成細條——米白底＋金髮絲上下線＋ghost CTA，
   並由 quiz.js 移到 mood 區之後（不再卡在 header 下推開問候語） */
.hh-quiz-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 26px 0 4px;
  padding: 9px 14px;
  background: #faf7ee;
  border-top: 1px solid rgba(171, 138, 84, 0.28);
  border-bottom: 1px solid rgba(171, 138, 84, 0.28);
  font-size: 13px;
  color: #5a5240;
}
.hh-quiz-banner-text {
  font-weight: 600;
  letter-spacing: 0.04em;
}
.hh-quiz-banner-cta {
  border: 1px solid rgba(148, 114, 62, 0.45);
  border-radius: 999px;
  padding: 4px 14px;
  background: none;
  color: #8a6a3c;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.hh-quiz-banner-cta:hover {
  /* 2026-07-04 backlog 修：原深綠底＋金棕字＝對比 1.5:1 字消失 */
  background: rgba(148, 114, 62, 0.08);
}
.hh-quiz-banner-cta:active {
  transform: scale(0.96);
}
/* 桌機首頁不放徵答 banner（避免壓在電影感 hero 上破壞美感）；桌機入口改走會員儀表板概覽卡＋專欄膠囊 */
@media (min-width: 1024px) {
  .hh-quiz-banner {
    display: none !important;
  }
}

/* ── 浮層 ── */
.hh-quiz-overlay {
  position: fixed;
  inset: 0;
  z-index: 10060; /* 2026-07-03 健檢修：原 4000 被購物車 FAB(10000) 穿透，對齊 tasting-draw */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(28, 34, 28, 0.55);
  -webkit-backdrop-filter: var(--hh-scrim-blur);
  backdrop-filter: var(--hh-scrim-blur);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.hh-quiz-overlay.is-open {
  opacity: 1;
}
.hh-quiz-panel {
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  max-height: 90dvh; /* iOS 動態視口（舊 Safari 吃上行 fallback） */
  overflow-y: auto;
  background: #fdfdfb;
  border-radius: 18px;
  padding: 20px 20px 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  transform: translateY(14px) scale(0.98);
  transition: transform 0.25s ease;
  -webkit-overflow-scrolling: touch;
}
.hh-quiz-overlay.is-open .hh-quiz-panel {
  transform: translateY(0) scale(1);
}
.hh-quiz-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(58, 90, 68, 0.08);
  color: #55684f;
  font-size: 15px;
  cursor: pointer;
}
.hh-quiz-close:hover {
  background: rgba(58, 90, 68, 0.16);
}
.hh-quiz-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 30px 14px 2px;
}
.hh-quiz-head h3 {
  margin: 0;
  font-size: 18px;
  color: #2f4b3c;
  letter-spacing: 0.04em;
}
.hh-quiz-ico {
  font-size: 22px;
}

.hh-quiz-lead {
  margin: 4px 0 12px;
  color: #5a6a55;
  font-size: 14px;
}
.hh-quiz-levels {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 按鈕 */
.hh-quiz-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(58, 90, 68, 0.22);
  border-radius: 12px;
  padding: 12px 16px;
  background: #fff;
  color: #33463a;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.hh-quiz-btn:hover {
  background: #f2f6ee;
  border-color: rgba(58, 90, 68, 0.4);
}
.hh-quiz-btn:active {
  transform: scale(0.98);
}
.hh-quiz-btn.primary {
  background: #3a5a44;
  border-color: #3a5a44;
  color: #fff;
}
.hh-quiz-btn.primary:hover {
  background: #2f4b3c;
}

/* 登入提示 */
.hh-quiz-login {
  text-align: center;
  padding: 18px 6px 8px;
}
.hh-quiz-login-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: #2f4b3c;
}
.hh-quiz-login-desc {
  margin: 0 0 18px;
  font-size: 13px;
  color: #77836f;
}

/* 題目 */
.hh-quiz-q-meta {
  font-size: 12px;
  color: #8a9682;
  margin-bottom: 8px;
}
.hh-quiz-q-stem {
  margin: 0 0 16px;
  font-size: 17px;
  line-height: 1.5;
  color: #24301f;
  font-weight: 600;
}
.hh-quiz-opts {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hh-quiz-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  border: 1px solid rgba(58, 90, 68, 0.18);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  color: #33463a;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.hh-quiz-opt:hover:not(:disabled) {
  background: #f2f6ee;
  border-color: rgba(58, 90, 68, 0.4);
}
.hh-quiz-opt:disabled {
  cursor: default;
}
.hh-quiz-opt-n {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(58, 90, 68, 0.1);
  color: #3a5a44;
  font-size: 13px;
  font-weight: 700;
}
.hh-quiz-opt.is-correct {
  background: #e6f3e7;
  border-color: #7db09c;
  color: #276b4a;
}
.hh-quiz-opt.is-correct .hh-quiz-opt-n {
  background: #7db09c;
  color: #fff;
}
.hh-quiz-opt.is-wrong {
  background: #fbeaea;
  border-color: #e0a0a0;
  color: #a4433a;
}
.hh-quiz-opt.is-wrong .hh-quiz-opt-n {
  background: #d98a8a;
  color: #fff;
}
.hh-quiz-hint {
  margin: 12px 2px 0;
  font-size: 12px;
  color: #9aa690;
}

/* 結果 */
.hh-quiz-result {
  margin-top: 16px;
  border-top: 1px dashed rgba(58, 90, 68, 0.2);
  padding-top: 14px;
}
.hh-quiz-result-head {
  font-size: 16px;
  font-weight: 700;
  color: #2f4b3c;
}
.hh-quiz-result.bad .hh-quiz-result-head {
  color: #a4433a;
}
.hh-quiz-answer {
  margin-top: 6px;
  font-size: 14px;
  color: #33463a;
}
.hh-quiz-note {
  margin-top: 6px;
  font-size: 13px;
  color: #77836f;
}
.hh-quiz-note.dim {
  color: #9aa690;
}
.hh-quiz-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.hh-quiz-actions .hh-quiz-btn {
  flex: 1;
  min-width: 130px;
}

.hh-quiz-loading,
.hh-quiz-error,
.hh-quiz-done {
  text-align: center;
  padding: 28px 8px;
  color: #77836f;
  font-size: 14px;
}
.hh-quiz-done p {
  margin: 0 0 14px;
  font-size: 15px;
  color: #33463a;
}

/* 手機：底部貼齊、卡片略滿版 */
@media (max-width: 520px) {
  .hh-quiz-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .hh-quiz-panel {
    max-width: 100%;
    max-height: 92vh;
    max-height: 92dvh;
    border-radius: 18px 18px 0 0;
    transform: translateY(100%);
  }
  .hh-quiz-overlay.is-open .hh-quiz-panel {
    transform: translateY(0);
  }
}
