/* ===== Global ===== */
body{
  background:linear-gradient(to bottom,#faf8f5,#ffffff);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

#body-container {
  flex: 1;
}

/* ===== Hero ===== */

.hero{
  padding:120px 24px 100px;
  text-align:center;
  background:linear-gradient(to bottom, #f6f6f6, #faf8f5);
  overflow:hidden;  
}

.hero::before{
  content:"";
  position:absolute;
  width:500px;
  height:500px;
  background:radial-gradient(circle, rgba(0,0,0,0.04) 0%, transparent 70%);
  top:-200px;
  left:50%;
  transform:translateX(-50%);
  pointer-events:none;
}

.hero-inner{
  max-width:800px;
  margin:0 auto;
}

.hero-title{
  font-weight:300;
  letter-spacing:0.02em;
  line-height:1.45;
  font-size: clamp(24px, 5.2vw, 40px);
}

.hero-line1{
  display:inline-block;
  white-space:nowrap;
  max-width:100%;
}

.hero-sub{
  font-size:18px;
  color:#6b6b6b;
  font-weight:300;
}

/* ===== Intro-Explain ===== */

.intro-explain {
  padding: 80px 24px 80px;
  background: #fff;
  text-align: left;
}

.intro-explain .intro-inner {
  max-width: 720px;
  margin: 0 auto;
}

.intro-explain h2 {
  font-size: clamp(22px, 4.5vw, 28px);
  font-weight: 400;
  color: #5b4b3a;
  margin-bottom: 22px;
  text-align: center;  
  line-height: 1.45;
}

.explain-text {
  font-size: 16px;
  line-height: 1.75;
  color: #4b5563;
  max-width: 470px;
  margin: 0 auto;
}

/* ===== Intro ===== */

.intro-section{
  padding:100px 24px;
  background:#faf6f1;
  text-align:center;
}

.intro-inner{
  max-width:800px;
  margin:0 auto;
}

.intro-section h2{
  font-size: clamp(22px, 4.5vw, 28px);
  font-weight:400;
  margin-bottom:40px;
  letter-spacing:1px;
  line-height: 1.45;
}

.feature-list{
  font-size:16px;
  line-height:2;
  margin:0 auto 40px auto;
  color:#334155;
  text-align:left;
  max-width:412px;
}

.pre-start{
  font-size:15px;
  color:#64748b;
  margin-bottom:40px;
}

.start-btn{
  background:#ff7a6e;
  color:white;
  padding:14px 36px;
  border:none;
  border-radius:30px;
  font-size:16px;
  font-weight: bold;
  cursor:pointer;
  transition:all 0.3s ease;
}

.start-btn:hover{
  transform:translateY(-2px);
  box-shadow:0 10px 30px rgba(0,0,0,0.15);
}

.start-btn:active,
.quiz-buttons button:active {
  transform: scale(0.95);
}

/* ===== Quiz ===== */

.quiz-container{
  background:#f8f9fa;
}  

.container{
  min-height: calc(100vh - 320px);
  max-width:800px;
  margin:auto;
  padding:40px 20px;
  display:none;
}

.quiz-wrapper{
  max-width:640px;
  min-height: auto;
  margin:0 auto;
  padding:30px 20px 30px;
}

.progress-wrapper{
  margin-bottom:20px;
}

.progress-info{
  font-size:13px;
  color:#8b8b8b;
  text-align:right;
  margin-bottom:6px;
}

.progress-bar{
  height:8px;
  background:#ece7e1;
  border-radius:999px;
  overflow:hidden;
  margin-bottom:12px;
}

.progress-fill{
  height:100%;
  width:0%;
  background:linear-gradient(90deg,#d6bfa7,#e8a87c);
  transition:width 0.4s ease;
}

.option-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 8px;
  border-radius: 20px;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  min-width: 0px;
  flex: 1;
}

/* 桌面才有 hover */
@media (hover: hover) and (pointer: fine) {
  .option-card:hover {
    border: 1px solid rgba(255,122,110,0.5);
  }
}

/* 手機點擊感 */
.option-card:active {
  transform: scale(0.96);
}

.option-card input[type="radio"] {
  appearance: none;                     /* 移除原生外觀 */
  width: 13px;
  height: 13px;
  border: 1.5px solid lightslategrey;         /* 未選中時灰色邊框 */
  border-radius: 50%;
  margin-bottom: 4px;
  position: relative;
  background: white;                    /* 背景白色 */
  transition: all 0.2s ease;
}

.option-card input[type="radio"]:checked  {
  border: 1.5px solid transparent;                      /* 邊框完全移除 */
  background: #ff7a6e;                  /* 選中顏色 */
  box-shadow: 0 0 0 3px rgba(255,122,110,0.3);
}

.option-card span {
  font-size: 13px;
  color: #374151;
  margin-left: 3px;
}

.option-card span:last-child {
  font-size: 12px;
  margin-top:4px;
  color: #64748b;
  text-align: center;
  line-height: 1.15;
  min-height: 24px;
}

.quiz-buttons{
  margin-top:30px;
  text-align:center;
}

.quiz-buttons button{
  padding:10px 22px;
  border-radius:20px;
  border: 1px solid #ff7a6e;
  background:#ff7a6e;
  color:#fff;
  font-size:15px;
  font-weight: bold;
  cursor:pointer;
  margin-right: 5px;
  }

.quiz-buttons button:hover{
  transform:translateY(-2px);
  box-shadow:0 10px 30px rgba(0,0,0,0.15);
}

.card{
  background:white;
  padding:30px;
  border-radius:8px;
  box-shadow:0 4px 6px rgba(0,0,0,0.2);
  margin-top:30px;
}

#resultSection{
  display:none;
}

/* ===== Result Layout ===== */

.result-wrapper{
  max-width:900px;
  margin:0 auto;
  padding:0 20px 100px;
}

.result-block{
  background:#ffffff;
  border-radius:18px;
  padding:40px 36px;
  margin-bottom:40px;
  box-shadow:0 10px 40px rgba(0,0,0,0.06);
}

.result-block h3{
  font-size:20px;
  font-weight:600;
  margin-bottom:20px;
  letter-spacing:0.03em;
  color:#1f2937;
}

#quadrantCanvas {
  display: block;
  margin: 10px auto;
}

.canvas-wrapper {
  position: relative;
  width: 100%;                   /* 手機佔滿寬度 */
  padding-top: 100%;             /* 高度 = 寬度 → 正方形 */
  max-width: 600px;              /* 桌面不要太大，可調整 */
  margin: -40px auto -60px;             /* 置中 */
}

.canvas-wrapper canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.result-value{
  font-size:36px;
  font-weight:700;
  margin:10px 0 20px;
  color:#111827;
}

.result-sub{
  font-size:15px;
  color:#6b7280;
  line-height:1.8;
}

/* 分數標籤 */
.score-badge{
  display:inline-block;
  padding:6px 14px;
  border-radius:999px;
  font-size:13px;
  background:#f3f4f6;
  color:#374151;
  margin-left:10px;
}

/* 分數列表 */
.score-list{
  display:flex;
  flex-wrap:wrap;
  gap:18px;
  margin-top:20px;
}

.score-item{
  flex:1 1 200px;
  background:#f4efe8;
  padding:18px;
  border-radius:18px;
  text-align:center;
}

.score-item strong{
  display:block;
  font-size:24px;
  margin-top:6px;
  font-weight:500;
  color:#374151;
}

#summary{
  background:#ffffff;
  padding:40px;
  border-radius:20px;
}

.report-intro{
  text-align:center;
  margin-bottom:60px;
}

.report-title{
  font-size:30px;
  font-weight:500;
  color:#5b4b3a;
  margin-bottom:14px;
}

.report-sub{
  font-size:15px;
  color:#8b8175;
}

.report-section{
  background:#ffffff;
  padding:44px;
  border-radius:26px;
  margin-bottom:50px;
  box-shadow: 0 20px 30px rgba(0,0,0,0.07);
}

.highlight-section{
  background:linear-gradient(135deg,#faf6f1,#f2ebe3);
}

.section-tag{
  font-size:18px;
  font-weight:500;
  letter-spacing:0.02em;
  color:#7a6a58;
  margin-bottom:20px;
}

.section-score{
  font-size:16px;
  color:#5b4b3a;
}

.section-level{
  font-size:15px;
  color:#7a6a58;
  margin-bottom:24px;
}

.section-main{
  font-size:24px;
  font-weight:500;
  color:#5b4b3a;
  margin-bottom:18px;
}

.section-text{
  font-size:16px;
  line-height:1.95;
  color:#4b5563;
}

.section-text div {
    line-height: 1.95;
}

.axis-distribution {
  display: flex;
  flex-wrap: wrap;           /* 允許換行 */
  justify-content: space-between;  /* 桌面版平均分配空間 */
  gap: 24px;                 /* 項目之間間距 */
  margin-top: 16px;          /* 與上方標題拉開距離 */
  line-height: 1.95;
  font-size: 16px;
  color: #4b5563;
}

.axis-item {
  flex: 1 1 30%;
  text-align: left;
  padding: 12px 16px;
  background: #faf6f1;
  border-radius: 8px;
  box-sizing: border-box;
}

.axis-label {
  font-weight: 600;
  margin-bottom: 4px;
}

.axis-score {
  color: #6b7280;
  font-size: 0.95em;
  margin-top: 2px;
}

.report-footnote{
  margin-top:40px;
  font-size:14px;
  color:#8b8175;
  line-height:1.8;
  text-align:center;
}

.cta{
  margin-top:40px;
  padding:44px;
  background:linear-gradient(135deg,#f5efe8,#ece6de);
  border-radius:18px;
  font-size:16px;
  color:#444;
}

/* radar spacing */
canvas{
  margin: 0px;
}

.disclaimer-section{
  padding:30px 20px;
  text-align:center;
  background:#faf8f5;
  font-size:15px;
  color:#777;
  line-height:1.6;
}

.reveal{
  opacity:0;
  transform:translateY(18px);
  transition:opacity 0.9s ease, transform 0.9s ease;
}

.reveal.show{
  opacity:1;
  transform:none;
}

/* ===== Result Buttons ===== */

.result-actions {
  display: flex;
  justify-content: center;
  gap: 28px;                    /* 按鈕之間間距 */
  margin-top: 48px;
  flex-wrap: wrap;
}

.result-actions button,
.result-actions a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: inherit;
  background: none;
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-circle-restart,
.icon-circle-share,
.icon-circle.primary {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  background: #ffffff;
  border: 1.5px solid #e8e0d5;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transition: all 0.25s ease;
}
 
.icon-circle-restart img,
.icon-circle-share img,
.icon-circle.primary img {
  width: 36px;
  height: 36px;
  margin-top: 4px;
  filter: brightness(0) saturate(100%) invert(35%) sepia(88%) saturate(748%) hue-rotate(332deg) brightness(95%) contrast(92%);
  /* 以上 filter 會把圖片轉成 #ff7a6e 主色 */
}

.label {
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  color: #4a4035;
  margin-top: 4px;
}

.icon-circle.primary {
  background: #ff7a6e;
  box-shadow: 0 6px 16px rgba(255, 122, 110, 0.25);
}

.icon-circle.primary img {
  filter: brightness(0) invert(1);   /* 白色圖示 */
}

.result-actions button:hover .icon-circle-restart,
.result-actions button:hover .icon-circle-share,
.result-actions a:hover .icon-circle {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

/* 分享卡片 */
.share-card{
  position:fixed;
  top:0;
  width:1080px;
  height: 1350px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.share-inner{
  width: 920px;
  max-height: 1230px;
  margin: 60px auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: linear-gradient(135deg,#fdf8f3,#f9f4ee);
  border-radius: 30px;
  padding: 60px 80px 20px;
  box-shadow: 0 30px 90px rgba(0,0,0,0.08); 
  overflow: hidden !important;     /* 強制圓角框剪裁所有內容 */
  position: relative !important;
  box-sizing: border-box;
}

.share-title,
.share-style{
  text-align: center;
}

.share-title{
  font-size:28px;
  color: #8c7a68;
  margin-bottom:0px;
}

.share-style{
  font-size:42px;
  font-weight:600;
  margin-bottom:20px;
  color:#5b4b3a;
}

.share-section{
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align:left;
  margin:0;
}

.share-label{
  font-size:24px;
  color:#a38f72;
  letter-spacing:0.08em;
}

.tagline-wrap{
  position:relative;
}

.tagline-text{
  display:inline;
}

.leaf svg{
  width:24px;
  height:24px;
  opacity:0.9;
}

.leaf-left svg{
  width:24px;
  height:24px;	
  transform:rotate(5deg);
}

.leaf-left{
  flex-shrink:0;
  margin-top:6px;
  transform:translateY(-40%) rotate(5deg);
}

.leaf-right svg{
  width:24px;
  height:24px;
  transform:rotate(30deg) translateY(5px);
}

.leaf-right{
  display:inline-block;
  margin-left:6px;
  vertical-align:baseline;
}

.no-break{
  white-space:nowrap;
}

.share-inner-voice{
  font-size:30px;
  line-height:1.6;
  color:#3f2e21;
  font-weight:500;
  display:flex;
  align-items:flex-start;
  gap:6px;
  margin-bottom:16px;
}

.share-reframe{
  font-size:28px;
  line-height:1.7;
  color:#5b4b3a;
  text-align:left;
}

.share-chart{
  display: flex;
  justify-content: center;
  margin: -10px auto -80px;
}

.share-chart canvas{
  width: 520px !important;
  height: 520px !important;
}	

.share-scores {
  display: flex;
  flex-direction: column;
}

.score-row{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom: 10px;
}

.score-label{
  width:100px;
  font-size: 24px;
  color: #5a4d40;
  flex-shrink: 0;
}

.score-bar{
  flex:1;
  height:12px;
  background:#f5f1ec;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.03);
  border-radius:999px;
  overflow:hidden;
}

.score-fill{
  height:100%;
  width:0;
  background:#c7a17a;
  border-radius:999px;
}

.score-value{
  width: 50px;
  font-size: 24px;
  text-align: right;
  color: #7a6a58;
  flex-shrink: 0;
}

.share-brand {
  font-size: 18px;
  color: #b0a79f;
  white-space: nowrap;
  margin: 20px auto 0;
  font-size: clamp(12px, 3.6vw, 16px);
  opacity: 0.8;
  text-align: center;
  line-height: 1.3;
  max-width: 100%;
  display: block;
  overflow: visible;
  text-overflow: clip;
}

#shareCard{
  position: fixed;            /* 固定在畫面外 */
  top: 0;
  left: -9999px;              /* 移到左邊視窗外 */
  width: 1080px;
  background: linear-gradient(135deg,#fdf8f3,#f3e8dc);
  box-sizing: border-box;
  z-index: -1;                /* 不要太極端的負值，避免被 Safari 忽略 */
  pointer-events: none;
  overflow: hidden !important;
  visibility: visible;
  opacity: 1;
}

.question-block {
  background: #fff;
  border-radius: 12px;
/*  padding: 22px;  */
  padding-top: 30px;
/*  box-shadow: 0 3px 12px rgba(0,0,0,0.06); */
  margin-bottom: 30px;
}

.question-header {
  display: flex;
  align-items: flex-start;
  gap: 2px;
}

.question-number {
  font-size: 20px;
  font-weight: bold;
  min-width: 32px;
  flex-shrink: 0;
}

.question-text {
  font-size: 22px;
  line-height: 1.35;
  color: #1f2937;
  word-break: break-word;        /* 重要：長文字自動換行 */
  overflow-wrap: break-word;
  margin: 0 0 22px 3px;
}

.options-row {
  display: flex;
  flex-wrap: nowrap;               /* 強制同一行 */
  justify-content: space-between;  /* 平均分配空間 */
  gap: 4px;                        /* 最小間距 */
  overflow-x: hidden;              /* 完全禁止橫向滾動 */
}

.option-item {
  flex: 1 1 auto;                  /* 自動等寬 */
  min-width: 0;                    /* 允許壓縮 */
  max-width: none;                  /* 限制最大寬度，7個約 14% */
  text-align: center;
}

/* 桌面版恢復橫向排列（大螢幕好看） */
@media (min-width: 769px) {
  .axis-distribution {
    flex-wrap: nowrap;       /* 強制不換行 */
  }
}

@media (max-width:768px){
  .hero h1{
    font-size: clamp(18px,8vw,28px);
  }

  .intro-explain h2,
  .intro-section h2{
    font-size: clamp(18px,6vw,24px);
  }

  .question-text{
    font-size:24px;
  }

  .option-card{
    font-size:20px;
    padding: 8px 2px;
  }
  
  .canvas-wrapper{
	  margin: -40px auto 40px;
  }
  
  .axis-distribution {
    flex-direction: column;  /* 手機強制垂直 */
    gap: 20px;               /* 手機垂直間距稍小一點 */
    align-items: stretch;    /* 每個項目拉滿寬度 */
  }

  .axis-item {
    flex: 1 1 100%;
    min-width: 100%;
  }
  
  .share-chart{
	  margin: -15px auto -15px;
  }
  
  .share-card .share-chart img {
    max-width: 320px;  /* 手機版稍小一點 */
  }

  .share-scores .score-row span:first-child {
    font-weight: bold;
    margin-bottom: 4px;
  }

  .option-card span:last-child {
	  font-size: 11px;
  }
  
  .result-actions {
    gap: 20px;
  }
  
  .icon-circle-restart,
  .icon-circle-share,
  .icon-circle.primary {
  width: 50px;
  height: 50px;
  }
  
  .icon img,
  .icon-circle.primary img  {
  width: 24px;
  height: 24px;
  }
  
  .label {
    font-size: 14.5px;
  }
}