/*!*************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[10].use[3]!./app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************/
/* 品味量表 · 暖色系主題（與第一個測驗的藍色風格區隔） */
:root {
  --bg: #fff7ed;
  --card: #ffffff;
  --text: #292524;
  --muted: #78716c;
  --line: #f0e2d3;
  --primary: #ea580c;
  --primary-ink: #ffffff;
  --active-bg: #fff1e6;
  --active-line: #ea580c;
  --shadow: 0 6px 24px rgba(120, 60, 10, 0.08);
  --hero1: #fb923c;
  --hero2: #f43f5e;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1512;
    --card: #262019;
    --text: #f5efe9;
    --muted: #a8a29e;
    --line: #3a2f26;
    --primary: #fb923c;
    --primary-ink: #1c1512;
    --active-bg: #33261c;
    --active-line: #fb923c;
    --shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
    --hero1: #ea580c;
    --hero2: #be123c;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang TC",
    "Microsoft JhengHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

/* ===== 版面骨架：整螢幕高、手機不捲動、字級隨螢幕縮放 ===== */
.screen {
  min-height: 100dvh;
  max-width: 560px;
  margin: 0 auto;
  padding: clamp(14px, 3vh, 22px) 18px calc(clamp(14px, 3vh, 22px) + 22px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(12px, 2.4vh, 20px);
}

.quizScreen,
.resultScreen {
  height: 100dvh;
  overflow: hidden;
}

.quizScreen {
  justify-content: flex-start;
}

.quizScreen .card {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* 自動縮放容器：撐滿可用空間、置中，內容用 transform 縮到剛好 */
.autofitBox {
  flex: 1 1;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.autofitInner {
  width: 100%;
  transform-origin: center center;
}

/* 結果頁：讓卡片交給 AutoFit 縮放 */
.resultScreen {
  justify-content: flex-start;
}

.card {
  background: var(--card);
  border-radius: 20px;
  padding: clamp(20px, 3.2vh, 28px) clamp(18px, 5vw, 24px);
  box-shadow: var(--shadow);
}

/* ===== 底部版本號 ===== */
.appFooter {
  position: fixed;
  bottom: 10px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--muted);
  opacity: 0.6;
  pointer-events: none;
}

/* ===== 測驗名稱標題列 ===== */
.quizHeader {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  background: var(--active-bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.quizHeader svg {
  width: 16px;
  height: 16px;
}

/* ===== 進度條 ===== */
.topbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progressTrack {
  height: 8px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.progressFill {
  height: 100%;
  background: linear-gradient(90deg, var(--hero1), var(--primary));
  border-radius: 999px;
  transition: width 0.3s ease;
}

.counter {
  font-size: 14px;
  color: var(--muted);
  text-align: right;
}

/* ===== 題目 ===== */
.qNumber {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.04em;
}

.qText {
  margin: 0 0 clamp(18px, 3.5vh, 28px);
  font-size: clamp(18px, 4.6vw, 22px);
  font-weight: 600;
  line-height: 1.5;
}

.options {
  display: flex;
  flex-direction: column;
  gap: clamp(9px, 1.5vh, 12px);
}

/* 1~4 量表選項：左邊數字圓章（暖色由淺到深）＋ 文字 */
.scaleOption {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: clamp(11px, 1.8vh, 15px) 16px;
  font-size: clamp(16px, 4.2vw, 18px);
  text-align: left;
  color: var(--text);
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease,
    transform 0.05s ease;
}

.scaleNum {
  flex: 0 0 auto;
  width: clamp(30px, 5vh, 36px);
  height: clamp(30px, 5vh, 36px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 800;
  color: #7c2d12;
}

/* 由淺到深的暖色，暗示「程度」 */
.scaleOption:nth-child(1) .scaleNum {
  background: #ffedd5;
}
.scaleOption:nth-child(2) .scaleNum {
  background: #fed7aa;
}
.scaleOption:nth-child(3) .scaleNum {
  background: #fdba74;
}
.scaleOption:nth-child(4) .scaleNum {
  background: #fb923c;
  color: #fff;
}

.scaleOption:hover {
  border-color: var(--active-line);
}

.scaleOption:active {
  transform: scale(0.99);
}

.optionActive {
  border-color: var(--active-line);
  background: var(--active-bg);
  font-weight: 600;
}

/* ===== 導覽 / 按鈕 ===== */
.navbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s ease, transform 0.05s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.btnPrimary {
  background: var(--primary);
  color: var(--primary-ink);
}

.btnGhost {
  background: transparent;
  color: var(--muted);
}

/* ===== 首頁 ===== */
.introCard {
  text-align: center;
}

.introTitle {
  margin: 0 0 16px;
  font-size: 28px;
}

.introText {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 16px;
  text-align: left;
}

.introMeta {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
}

.introCard .btn {
  width: 100%;
}

/* ===== 結果頁：分數儀表板 ===== */
.resultCard {
  padding: 0;
  overflow: hidden;
  animation: pop 0.35s ease;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.scoreHero {
  padding: clamp(24px, 4.5vh, 40px) 24px clamp(20px, 3.5vh, 32px);
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, var(--hero1), var(--hero2));
}

.scoreLabel {
  margin: 0 0 4px;
  font-size: 15px;
  opacity: 0.9;
}

.scoreNumber {
  margin: 0;
  font-size: clamp(44px, 12vw, 60px);
  font-weight: 800;
  line-height: 1;
}

.scoreMax {
  font-size: clamp(18px, 4.5vw, 24px);
  font-weight: 600;
  opacity: 0.85;
}

.scorePct {
  margin: 6px 0 0;
  font-size: 14px;
  opacity: 0.9;
}

.resultBody {
  padding: clamp(18px, 3vh, 26px) clamp(20px, 5vw, 24px) clamp(20px, 3.5vh, 30px);
}

.subscales {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 2.4vh, 18px);
  margin-bottom: clamp(16px, 3vh, 24px);
}

.barTop {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.barName {
  font-size: clamp(15px, 4vw, 17px);
  font-weight: 600;
}

.barScore {
  font-size: clamp(15px, 4vw, 17px);
  font-weight: 700;
}

.barMax {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.barTrack {
  height: 10px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.barFill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.5s ease;
}

.note {
  margin: 0 0 clamp(18px, 3vh, 24px);
  font-size: clamp(13px, 3.6vw, 15px);
  color: var(--muted);
  text-align: left;
}

.resultBody .btn {
  width: 100%;
}

