@charset "UTF-8";

/* ═══════════════════════════════════
   CSS VARIABLES & RESET
═══════════════════════════════════ */
:root{
  --bg:           #fdf4f5;
  --crimson:      #8b1a2f;
  --crimson-mid:  #a52a3e;
  --gold:         #b8860b;
  --gold-light:   #d4a020;
  --gold-deep:    #8a6408;
  --ink:          #1e1010;
  --ink-soft:     #6a5050;
  --border:       #e8cdd0;
  --max-w:        1200px;
}
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;font-size:17px}
body{font-family:'Noto Sans TC',sans-serif;background:var(--bg);color:var(--ink);line-height:1.9;overflow-x:hidden;}

[class*="col-"] { width: 100%; }

@media only screen and (min-width: 1000px) {
  .col-4 {width: 33.33%;}
  .col-6 {width: 50%; padding-right: 10px; padding-left: 10px;}
  .col-8 {width: 66.66%;}
  .col-12 {width: 100%;}
}

.row {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  margin-right: 0px;
  margin-left: 0px;  
}

h2 {
  color: #352301;
  border-left: 5px solid #aa0000;
  padding-left: 15px;
  margin-top: 40px;
  margin-bottom: 20px;
  background-color: #CCEDA9;
  padding-top: 5px;
  padding-bottom: 5px;
}
h3 {
  color: #7b1fa2;
  margin-top: 30px;
  font-weight: bold;
  border-bottom: 1px dashed #ccc;
  padding-bottom: 5px;
}
p {
  margin-bottom: 15px;
  text-align: justify;
}
.highlight {
  font-weight: bold;
  color: #bf360c;
}
.intro-box {
  background-color: #fff;
  border: 1px solid #ddd;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
ul {
  list-style-type: square;
  padding-left: 20px;
}
a {
  color: #0000ff;
  text-decoration: none;
}		
a:hover {
  color: #AA0000;
  text-decoration: underline;
}
img {
  display:block;
  margin:auto;
  border-style: none;
}
label {
  display: inline-block;
  margin-bottom: 0.5rem;
}
input, button, select {
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}
fieldset {
  min-width: 0;
  padding: 0px;
  margin-top: 0px;
  border: 0;
}
#myfate {
  background-color: #EEE;
  padding-top: 20px;
  padding-bottom: 20px;
  width: 100%;
  height: 380px;
}
#datain {
  color: #000;
  font-weight: bold;
  text-align: center;
  width: 100%;
}
.mybirth {
  font-family: Arial, Helvetica, sans-serif;
}
.icity {
  color: #C00;
  font-weight: bold;
}
.myradio {
  width:1.0em;
  height:1.0em;	
}
#submitb {
  display: inline-block;
  padding: 12px 35px;
  background-color: #029F14;
  color: #fff;
  text-decoration: none;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
#submitb:hover {
  color: #fff;
  font-size: 1.1rem;
  background-color: #e74c3c;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  cursor: pointer;
}
.mcell {
  font-size: 18px;
  height: 40px;
  width: 50%;
  float: left;
  vertical-align: middle;
  text-align: center;
}
.cnt { text-align: center; }
.tag-read {
  display: inline-block;
  background: #090;
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.8em;
  margin-right: 5px;
  font-family: sans-serif;
}

/* FAQ Section 容器 */
.constellation-faq {
    background: #fdfdfd;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.constellation-faq h2 {
    text-align: center;
    color: #333;
    margin-bottom: 10px;
}

.constellation-faq > p {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

/* 分類標題 */
.faq-category h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: #5d4037; 
    border-left: 4px solid #d4a373;
    padding-left: 10px;
    font-size: 1.2rem;
}

/* 折疊項目 */
.constellation-faq details {
    margin-bottom: 10px;
    border: 1px solid #eee;
    border-radius: 4px;
    background: #fff;
    transition: all 0.3s ease;
}

.constellation-faq details[open] {
    border-color: #d4a373; /* 展開時的邊框色 */
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* 問題 (Summary) */
.constellation-faq summary {
    padding: 15px;
    cursor: pointer;
    font-weight: 600;
    color: #444;
    list-style: none; /* 隱藏預設三角形 */
    position: relative;
    padding-right: 40px;
}

/* 自定義展開圖示 */
.constellation-faq summary::-webkit-details-marker {
    display: none;
}

.constellation-faq summary::after {
    content: '+';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: #d4a373;
    font-weight: normal;
}

.constellation-faq details[open] summary::after {
    content: '-';
}

.constellation-faq summary:hover {
    background-color: #fafafa;
    color: #AA3333;
}

/* 答案 (Answer) */
.constellation-faq .faq-answer, 
.constellation-faq div[itemprop="acceptedAnswer"] {
    padding: 0 15px 15px 15px;
    color: #555;
    line-height: 1.6;
    font-size: 0.95rem;
    border-top: 1px solid transparent;
}

.constellation-faq details[open] div[itemprop="acceptedAnswer"] {
    border-top-color: #eee;
    padding-top: 15px;
}

/* 麵包屑導航樣式 */
.breadcrumb {
    display: flex;
    list-style: none;
    padding: 10px 0;
    font-size: 14px;
}

.breadcrumb li + li::before {
    content: " > ";
    padding: 0 8px;
    color: #666;
}

/* 目錄導航樣式 */
.table-of-contents {
    background: #f5f5f5;
    padding: 20px;
    margin: 20px 0;
    border-left: 4px solid #4A90E2;
}

.table-of-contents h2 {
    margin-top: 0;
    color: #333;
}

.table-of-contents ul {
    list-style: none;
    padding-left: 0;
}

.table-of-contents li {
    margin: 10px 0;
}

.table-of-contents a {
    color: #2339F8;
    text-decoration: none;
}

.table-of-contents a:hover {
    text-decoration: underline;
}

/* CTA 按鈕樣式 */
.cta-button {
    display: inline-block;
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.cta-button:hover {
    transform: scale(1.05);
	color: #FF0;
}

/* 圖片優化 */
figure {
    margin: 20px 0;
    text-align: center;
}

/* ── SKIP NAV ── */
.skip-nav{position:absolute;left:-999px;top:auto;width:1px;height:1px;overflow:hidden;}
.skip-nav:focus{left:20px;top:20px;width:auto;height:auto;padding:8px 16px;background:var(--crimson);color:#fff;z-index:9999;border-radius:4px;}

/* ═══════════════════════════════════
   TOP NAV
═══════════════════════════════════ */
.site-nav{
  background:linear-gradient(90deg,#2a0810,var(--crimson),#2a0810);
  padding:0 32px;display:flex;align-items:center;
  justify-content:space-between;height:52px;
  position:sticky;top:0;z-index:200;
  box-shadow:0 2px 14px rgba(139,26,47,.35);
}
.site-nav .logo{
  font-family:'Noto Serif TC',serif;font-size:14px;font-weight:700;
  color:var(--gold-light);letter-spacing:3px;
}
.nav-links{display:flex;gap:26px;list-style:none;}
.nav-links a{font-size:13px;color:rgba(255,255,255,.7);letter-spacing:1px;}
.nav-links a:hover{color:var(--gold-light);}

/* ═══════════════════════════════════
   HERO HEADER
═══════════════════════════════════ */
header{
  background:linear-gradient(160deg,#f5e0e4 0%,#fdf4f5 40%,#fae8ea 70%,#f5d8dc 100%);
  position:relative;overflow:hidden;
  padding:76px 24px 80px;text-align:center;
  border-bottom:1px solid var(--border);
}
/* Grid texture */
header::before{
  content:'';position:absolute;inset:0;
  background:
    repeating-linear-gradient(0deg,transparent,transparent 49px,rgba(139,26,47,.025) 50px),
    repeating-linear-gradient(90deg,transparent,transparent 49px,rgba(139,26,47,.025) 50px);
  pointer-events:none;
}
/* 紫 watermark */
.hero-watermark{
  position:absolute;right:-20px;top:-30px;
  font-family:'Noto Serif TC',serif;
  font-size:340px;font-weight:900;
  color:var(--crimson);opacity:.04;
  line-height:1;pointer-events:none;
  user-select:none;
  letter-spacing:0;
}
/* Gold orb top-left */
header::after{
  content:'';position:absolute;
  width:320px;height:320px;
  background:radial-gradient(circle,rgba(184,134,11,.1) 0%,transparent 68%);
  top:-80px;left:-80px;pointer-events:none;
}
.hero-badge{
  display:inline-block;
  background:linear-gradient(135deg,rgba(139,26,47,.12),rgba(184,134,11,.1));
  border:1px solid rgba(139,26,47,.3);
  color:var(--crimson);
  font-family:'Noto Serif TC',serif;font-size:12px;font-weight:600;
  letter-spacing:5px;padding:5px 24px;border-radius:20px;
  margin-bottom:24px;position:relative;z-index:1;
}
/* Top accent line */
.hero-line{
  position:absolute;top:0;left:0;right:0;height:5px;
  background:linear-gradient(90deg,transparent,var(--crimson) 20%,var(--gold) 50%,var(--crimson) 80%,transparent);
}
h1{
  font-family:'Noto Serif TC',serif;
  font-size:clamp(2.1rem,4.5vw,3.2rem);
  font-weight:900;color:var(--crimson);
  letter-spacing:3px;line-height:1.2;
  margin-bottom:12px;position:relative;z-index:1;
}
.hero-sub{
  text-align:center;
  font-family:'Noto Serif TC',serif;font-size:1.05rem;font-weight:500;
  color:var(--gold-deep);letter-spacing:2px;
  margin-bottom:18px;position:relative;z-index:1;
}
.hero-desc{
  font-size:15px;color:var(--ink-soft);max-width:560px;
  margin:0 auto 28px;line-height:1.85;position:relative;z-index:1;
}
.hero-meta{
  display:flex;align-items:center;justify-content:center;
  gap:24px;flex-wrap:wrap;
  font-size:13px;color:var(--ink-soft);position:relative;z-index:1;
}
.hero-meta span{display:flex;align-items:center;gap:5px;}
.hero-divider{
  width:100px;height:2px;margin:26px auto 0;
  background:linear-gradient(90deg,transparent,var(--crimson),var(--gold),var(--crimson),transparent);
}

/* ═══════════════════════════════════
   PAGE LAYOUT
═══════════════════════════════════ */
.page-outer{max-width:var(--max-w);margin:0 auto;padding:50px 20px 80px;position:relative;}

/* ── MAIN CONTENT ── */
/*.main-col{min-width:0;} */


/* ═══════════════════════════════════
   BACK TO TOP
═══════════════════════════════════ */
#back-top{
  position:fixed;bottom:32px;right:32px;
  width:48px;height:48px;
  background:var(--crimson);color:#fff;
  font-size:18px;border:2px solid var(--gold);
  border-radius:50%;cursor:pointer;
  box-shadow:0 4px 16px rgba(139,26,47,.35);
  opacity:0;transform:translateY(12px);
  transition:opacity .3s,transform .3s,background .2s;
  z-index:150;display:flex;align-items:center;justify-content:center;
}
#back-top.show{opacity:1;transform:translateY(0);}
#back-top:hover{background:var(--crimson-mid);}

/* Button */
.btn-container {
  text-align: center;
  margin-top: 80px;
  margin-bottom: 40px;
}

.btn-home {
  display: inline-block;
  background:var(--crimson);
  color: white;
  padding: 18px 60px;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 1.1rem;
  letter-spacing: 2px;
  border: 1px solid #FFF;
}

.btn-home:hover {
  background:var(--crimson-mid);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(184, 134, 11, 0.3);
}

/* ═══════════════════════════════════
   RESPONSIVE
═══════════════════════════════════ */
@media(max-width:1024px){
  .toc-col{display:none;}
  #back-top{bottom:20px;right:20px;}
}
@media(max-width:768px){
  .cards-grid,.gender-grid,.sihua-grid,.tips-grid{grid-template-columns:1fr;}
  .palace-grid{grid-template-columns:repeat(2,1fr);}
  .footer-top{grid-template-columns:1fr;}
  .nav-links{display:none;}
  h2{font-size:1.35rem;}
}
@media(max-width:480px){
  body{font-size:15px;}
  header{padding:52px 16px 64px;}
  .page-outer{padding:32px 16px 60px;}
  .summary-box{padding:28px 20px;}
  .faq-a-inner{padding-left:20px;}
  .footer-bottom{flex-direction:column;text-align:center;}
}