/* === 全域變數 === */
:root {
  --gold: #d4af37;
  --gold-soft: #e8c970;
  --deep-purple: #2a1a4a;
  --deep-blue: #0d1b3d;
  --ink: #f5f1e6;
  --ink-dim: #c9c2af;
  --danger: #c94b4b;
  --card-w: 110px;
  --card-h: 170px;
  --radius: 14px;
  --shadow-glow: 0 0 24px rgba(212, 175, 55, 0.35);
}

@media (min-width: 768px) {
  :root {
    --card-w: 150px;
    --card-h: 230px;
  }
}

/* === Reset / Base === */
* { box-sizing: border-box; }
html {
  background-color: var(--deep-blue);
}
html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: 'Noto Sans TC', system-ui, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body {
  background: transparent;
}
button { font-family: inherit; cursor: pointer; }
.hidden { display: none !important; }

/* === 背景層 === */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}
.bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(1) brightness(0.95);
}

/* === 過場蒙版：用背景圖完全覆蓋畫面，view 在底下切換 === */
.transition-cover {
  position: fixed;
  inset: 0;
  z-index: 1000;
  opacity: 0;
  overflow: hidden;
  animation: coverShow 2.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* 背景圖層 */
.transition-cover .cover-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.45) brightness(1.18) contrast(1.06);
  animation: coverZoom 2.5s ease-in-out forwards;
}

/* 繁星粒子層：多重 radial-gradient 模擬星空，搭配閃爍與向上飄移 */
.transition-cover .cover-stars {
  position: absolute;
  inset: -10%;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.95) 1px, transparent 1.8px),
    radial-gradient(circle, rgba(255, 230, 180, 0.85) 0.9px, transparent 1.6px),
    radial-gradient(circle, rgba(200, 180, 255, 0.7) 0.7px, transparent 1.4px),
    radial-gradient(circle, rgba(255, 255, 255, 0.5) 0.4px, transparent 1.2px);
  background-size: 110px 110px, 160px 160px, 80px 80px, 55px 55px;
  background-position: 0 0, 40px 70px, 25px 35px, 60px 20px;
  mix-blend-mode: screen;
  animation:
    starsDrift 2.5s linear forwards,
    starsTwinkle 1.6s ease-in-out infinite;
}

@keyframes starsDrift {
  0%   { transform: translateY(40px); }
  100% { transform: translateY(-60px); }
}
@keyframes starsTwinkle {
  0%, 100% { opacity: 0.45; }
  50%      { opacity: 1; }
}

/* 金色徑向光暈疊加，賦予魔法氛圍 */
.transition-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at center,
    rgba(255, 240, 200, 0.35) 0%,
    rgba(212, 175, 55, 0.22) 28%,
    rgba(180, 130, 230, 0.18) 55%,
    transparent 78%
  );
  mix-blend-mode: screen;
  pointer-events: none;
}

@keyframes coverShow {
  0%   { opacity: 0; }
  10%  { opacity: 1; }    /* 0-250ms：迅速覆蓋 */
  72%  { opacity: 1; }    /* 250-1800ms：維持完全覆蓋（view 在此期間切換）*/
  100% { opacity: 0; }    /* 1800-2500ms：淡出揭曉新 view */
}
@keyframes coverZoom {
  0%   { transform: scale(1.0); }
  25%  { transform: scale(1.12); }
  72%  { transform: scale(1.06); }
  100% { transform: scale(1.0); }
}
.bg-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(42, 26, 74, 0.15) 0%, rgba(13, 27, 61, 0.45) 55%, rgba(0, 0, 0, 0.75) 100%);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
}

/* === Header === */
.site-header {
  text-align: center;
  padding: 28px 16px 12px;
}
.site-title {
  font-family: 'Noto Serif TC', serif;
  font-weight: 900;
  font-size: clamp(28px, 7vw, 44px);
  margin: 0;
  color: var(--gold);
  letter-spacing: 0.15em;
  text-shadow: 0 0 18px rgba(212, 175, 55, 0.5), 0 2px 4px rgba(0, 0, 0, 0.6);
}
.site-subtitle {
  margin: 8px 0 0;
  font-size: 14px;
  letter-spacing: 0.3em;
  color: var(--ink-dim);
}

/* === Main / Views === */
.site-main {
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}
.view { display: none; }
.view-active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === 首頁按鈕 === */
#view-home.view-active {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 220px);
}
.home-buttons {
  display: grid;
  gap: 14px;
  margin-top: auto;     /* 推到下方避開算命師臉部 */
  padding-bottom: 12px;
}
.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 32px 16px;
  border: 1.5px solid var(--gold);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(42, 26, 74, 0.85), rgba(13, 27, 61, 0.85));
  color: var(--ink);
  font-family: 'Noto Serif TC', serif;
  font-size: 22px;
  letter-spacing: 0.15em;
  transition: transform 0.2s, box-shadow 0.3s, background 0.3s;
  min-height: 140px;
}
.nav-btn:hover,
.nav-btn:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
  background: linear-gradient(135deg, rgba(60, 40, 100, 0.9), rgba(20, 40, 90, 0.9));
}
.nav-btn:active { transform: scale(0.97); }
.nav-btn-icon { font-size: 42px; }
.nav-btn-text { font-weight: 700; }
.nav-btn-hint {
  font-size: 13px;
  letter-spacing: 0.15em;
  color: var(--ink-dim);
}

/* === 返回 / Reset / Submit 按鈕 === */
.back-btn {
  background: transparent;
  color: var(--ink-dim);
  border: 1px solid rgba(201, 194, 175, 0.4);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 14px;
  margin-bottom: 18px;
  transition: all 0.2s;
}
.back-btn:hover, .back-btn:focus-visible {
  color: var(--gold);
  border-color: var(--gold);
}

.view-title {
  font-family: 'Noto Serif TC', serif;
  font-size: 26px;
  color: var(--gold);
  margin: 4px 0 6px;
  letter-spacing: 0.15em;
}
.view-intro {
  font-size: 14px;
  color: var(--ink-dim);
  line-height: 1.7;
  margin: 0 0 22px;
}

.reset-btn, .submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin: 24px auto 0;
  padding: 14px 20px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--deep-blue);
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  border: none;
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.3);
  transition: transform 0.2s, box-shadow 0.3s;
  min-height: 48px;
}
.reset-btn .btn-icon,
.submit-btn .btn-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.reset-btn:hover, .submit-btn:hover,
.reset-btn:focus-visible, .submit-btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(212, 175, 55, 0.5);
}
.reset-btn:active, .submit-btn:active { transform: scale(0.98); }

/* === 塔羅問題輸入 === */
.question-panel {
  background: linear-gradient(160deg, rgba(42, 26, 74, 0.78), rgba(13, 27, 61, 0.75));
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: var(--radius);
  padding: 22px 20px 24px;
  margin-top: 8px;
  animation: fadeIn 0.5s ease;
  box-shadow: 0 0 36px rgba(212, 175, 55, 0.15);
}
.question-input-wrap {
  margin-top: 16px;
}
.question-input-wrap .field-label {
  display: block;
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--gold-soft);
  margin-bottom: 8px;
}
#question-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(212, 175, 55, 0.5);
  border-radius: 12px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.1s;
}
#question-input::placeholder {
  color: rgba(201, 194, 175, 0.45);
}
#question-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.25);
}
#question-input.shake {
  animation: shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97);
  border-color: #ff9a8b;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}
#question-confirm {
  margin-top: 14px;
}
.question-warning {
  color: #ff9a8b;
  font-size: 13px;
  margin: 10px 0 0;
  text-align: center;
  letter-spacing: 0.05em;
}

/* === 塔羅問題回顯（占卜階段） === */
.tarot-stage {
  animation: fadeIn 0.5s ease;
}
.question-display {
  background: rgba(0, 0, 0, 0.35);
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 0 0 16px;
}
.question-label {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--gold-soft);
  padding: 2px 8px;
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 4px;
  margin-bottom: 6px;
}
.question-text {
  font-family: 'Noto Serif TC', serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  margin: 4px 0 0;
  letter-spacing: 0.03em;
}

/* === 塔羅牌陣 === */
.tarot-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 24px auto 0;
  max-width: 560px;
  justify-items: center;
}
.tarot-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.slot-label {
  font-family: 'Noto Serif TC', serif;
  font-size: 14px;
  letter-spacing: 0.3em;
  color: var(--gold);
}

/* === 3D 翻牌 === */
.card {
  width: var(--card-w);
  height: var(--card-h);
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border-radius: 16px;
  outline: none;
}
.card.flipped { transform: rotateY(180deg); cursor: default; }
.card:not(.flipped):hover { transform: translateY(-4px) scale(1.03); }
.card:not(.flipped):hover .card-back {
  box-shadow:
    var(--shadow-glow),
    0 0 40px rgba(180, 130, 230, 0.5);
}

.card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 16px;
  border: 1.5px solid var(--gold);
  overflow: hidden;
  box-shadow:
    0 4px 18px rgba(0, 0, 0, 0.55),
    0 0 22px rgba(212, 175, 55, 0.25);
}

/* 牌背：可愛神秘的星空圖樣 */
.card-back {
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.5) 0.5px, transparent 1.5px),
    radial-gradient(circle at 70% 40%, rgba(255, 255, 255, 0.4) 0.5px, transparent 1.5px),
    radial-gradient(circle at 20% 70%, rgba(255, 255, 255, 0.4) 0.5px, transparent 1.5px),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.5) 0.5px, transparent 1.5px),
    radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.18) 0 6px, transparent 16px),
    radial-gradient(ellipse at center, #4a2d7a 0%, #2a1551 55%, #100828 100%);
  background-size: 60px 60px, 80px 80px, 70px 70px, 90px 90px, auto, auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-back::after {
  content: "✦";
  font-size: 52px;
  color: var(--gold);
  text-shadow:
    0 0 14px rgba(212, 175, 55, 0.9),
    0 0 28px rgba(212, 175, 55, 0.5);
  animation: twinkle 3s ease-in-out infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.7; transform: scale(1.1); }
}

/* 牌面：夢幻濾鏡 + 金色光暈 */
.card-front {
  transform: rotateY(180deg);
  background: #1a0f33;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter:
    saturate(1.25)
    contrast(1.06)
    brightness(1.04)
    sepia(0.08)
    hue-rotate(-4deg);
  transition: filter 0.4s ease;
}
/* 牌面光暈疊層：上方淡金光、整體柔紫漸層、邊緣暗角 */
.card-front::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 220, 150, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 100%, rgba(120, 80, 180, 0.18) 0%, transparent 55%);
  mix-blend-mode: screen;
}
.card-front::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.45);
  border-radius: inherit;
}
.card.reversed .card-front img { transform: rotate(180deg); }
.card.flipped .card-front {
  animation: cardGlow 2.5s ease-out;
}
@keyframes cardGlow {
  0%   { box-shadow: 0 0 0 rgba(212, 175, 55, 0); }
  30%  { box-shadow: 0 0 36px rgba(212, 175, 55, 0.65); }
  100% { box-shadow: 0 0 0 rgba(212, 175, 55, 0); }
}

/* === 塔羅解讀 === */
.tarot-readings {
  margin-top: 28px;
  display: grid;
  gap: 18px;
}
.reading-item {
  background: rgba(13, 27, 61, 0.78);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: var(--radius);
  padding: 18px 20px 20px;
  animation: fadeIn 0.6s ease;
}
.reading-position {
  display: inline-block;
  font-family: 'Noto Serif TC', serif;
  font-size: 12px;
  letter-spacing: 0.4em;
  color: var(--deep-blue);
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 12px;
  font-weight: 700;
}
.reading-name {
  font-family: 'Noto Serif TC', serif;
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--ink);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.reading-name-en {
  font-family: 'Noto Serif TC', serif;
  font-size: 13px;
  font-style: italic;
  color: var(--ink-dim);
  font-weight: 400;
  letter-spacing: 0.05em;
}
.reading-name .orientation {
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid currentColor;
  font-weight: 400;
  letter-spacing: 0.15em;
}
.reading-name .orientation.upright { color: var(--gold-soft); }
.reading-name .orientation.reversed { color: #ff9a8b; }

.reading-quote {
  font-family: 'Noto Serif TC', serif;
  font-style: italic;
  font-size: 15px;
  line-height: 1.7;
  color: var(--gold-soft);
  margin: 8px 0 12px;
  padding-left: 12px;
  border-left: 2px solid var(--gold);
  letter-spacing: 0.05em;
}

.reading-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.kw-pill {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: var(--gold-soft);
  letter-spacing: 0.1em;
}

.reading-text {
  font-size: 15px;
  line-height: 1.9;
  color: var(--ink);
  margin: 0 0 12px;
  letter-spacing: 0.02em;
}

.reading-general {
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink-dim);
  margin: 12px 0 0;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  border-left: 2px solid rgba(212, 175, 55, 0.3);
}
.reading-general-label {
  display: inline-block;
  font-family: 'Noto Serif TC', serif;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--gold-soft);
  margin-right: 8px;
  padding: 1px 6px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 4px;
}

.reading-reversed {
  font-size: 14px;
  line-height: 1.85;
  color: #ffd4cc;
  margin: 12px 0 0;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(201, 75, 75, 0.15), rgba(0, 0, 0, 0.25));
  border-left: 3px solid #ff9a8b;
  border-radius: 8px;
  letter-spacing: 0.02em;
}

/* === 八字表單 === */
.bazi-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);   /* 讓子欄位可以縮到不超出邊框 */
  gap: 16px;
  background: rgba(13, 27, 61, 0.65);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: var(--radius);
  padding: 22px 18px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;                            /* 避免日期 input 撐大 grid item */
}
.field-label {
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--gold-soft);
}
.field input[type="text"],
.field input[type="date"],
.field select {
  padding: 12px 14px;
  font-size: 16px;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  display: block;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}
/* iOS Safari 原生 date input 的特殊容器內距重設，避免內部按鈕撐大寬度 */
.field input[type="date"]::-webkit-date-and-time-value {
  text-align: left;
  min-width: 0;
}
.field input[type="date"]::-webkit-calendar-picker-indicator {
  margin-left: auto;
  cursor: pointer;
  filter: invert(0.6) sepia(1) saturate(4) hue-rotate(15deg);
}
.field input:focus, .field select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}
.field-radio {
  border: none;
  padding: 0;
  margin: 0;
  flex-direction: column;
  gap: 8px;
}
.field-radio .field-label { margin-bottom: 4px; }
.radio-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 24px;
  font-size: 16px;
}
.radio-item input { accent-color: var(--gold); transform: scale(1.2); }

/* === 八字結果 === */
.bazi-result {
  margin-top: 28px;
  display: grid;
  gap: 18px;
  animation: fadeIn 0.6s ease;
}
.bazi-block {
  background: rgba(13, 27, 61, 0.7);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: var(--radius);
  padding: 18px 18px 20px;
}
.bazi-block h3 {
  font-family: 'Noto Serif TC', serif;
  font-size: 18px;
  color: var(--gold);
  margin: 0 0 12px;
  letter-spacing: 0.2em;
}

/* 四柱表格 */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  text-align: center;
}
.pillar {
  background: linear-gradient(160deg, rgba(42, 26, 74, 0.8), rgba(13, 27, 61, 0.8));
  border: 1px solid var(--gold);
  border-radius: 10px;
  padding: 12px 6px;
}
.pillar-label {
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--gold-soft);
  margin-bottom: 8px;
}
.pillar-stem, .pillar-branch {
  font-family: 'Noto Serif TC', serif;
  font-size: clamp(20px, 6vw, 28px);
  font-weight: 700;
  line-height: 1.2;
}
.pillar-stem { color: var(--ink); }
.pillar-branch { color: var(--gold); margin-top: 4px; }

/* 農曆資訊 */
.lunar-info {
  font-size: 15px;
  line-height: 1.9;
  color: var(--ink);
}
.lunar-info span { color: var(--gold-soft); }

/* 五行條狀圖 */
.wuxing-list { display: grid; gap: 10px; }
.wuxing-row {
  display: grid;
  grid-template-columns: 60px 1fr 40px;
  align-items: center;
  gap: 10px;
}
.wuxing-name {
  font-family: 'Noto Serif TC', serif;
  font-size: 16px;
  font-weight: 700;
}
.wuxing-bar {
  height: 14px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}
.wuxing-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.8s ease;
}
.wuxing-count {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--ink-dim);
  font-size: 14px;
}
.wuxing-jin    { color: #e6d9a8; }
.wuxing-mu     { color: #88c98a; }
.wuxing-shui   { color: #6fb3e3; }
.wuxing-huo    { color: #e57c7c; }
.wuxing-tu     { color: #c9a37c; }
.wuxing-bar-fill.jin  { background: linear-gradient(90deg, #b8a468, #e6d9a8); }
.wuxing-bar-fill.mu   { background: linear-gradient(90deg, #4f8a52, #88c98a); }
.wuxing-bar-fill.shui { background: linear-gradient(90deg, #3a6e9a, #6fb3e3); }
.wuxing-bar-fill.huo  { background: linear-gradient(90deg, #a23a3a, #e57c7c); }
.wuxing-bar-fill.tu   { background: linear-gradient(90deg, #806248, #c9a37c); }

/* 日主解說 */
.day-master {
  font-size: 15px;
  line-height: 1.85;
  color: var(--ink);
}
.day-master strong {
  color: var(--gold);
  font-family: 'Noto Serif TC', serif;
  font-size: 17px;
}

/* === 稱骨算命 === */
.weight-block {
  border-color: rgba(212, 175, 55, 0.55) !important;
  background: linear-gradient(160deg, rgba(42, 26, 74, 0.85), rgba(13, 27, 61, 0.75));
}
.weight-total {
  text-align: center;
  padding: 14px 12px 16px;
  border-bottom: 1px dashed rgba(212, 175, 55, 0.3);
  margin-bottom: 14px;
}
.weight-total-label {
  font-size: 13px;
  letter-spacing: 0.3em;
  color: var(--gold-soft);
  margin-bottom: 8px;
}
.weight-total-value {
  font-family: 'Noto Serif TC', serif;
  font-weight: 900;
  font-size: clamp(32px, 10vw, 48px);
  color: var(--gold);
  text-shadow: 0 0 18px rgba(212, 175, 55, 0.4);
  letter-spacing: 0.08em;
}
.weight-pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}
.weight-cell {
  text-align: center;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 8px;
  padding: 8px 4px;
}
.weight-cell-label {
  font-family: 'Noto Serif TC', serif;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--gold-soft);
  margin-bottom: 4px;
}
.weight-cell-value {
  font-family: 'Noto Serif TC', serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.weight-verse {
  font-family: 'Noto Serif TC', serif;
  font-size: 16px;
  line-height: 2;
  color: var(--ink);
  letter-spacing: 0.05em;
  background: rgba(0, 0, 0, 0.32);
  border-left: 3px solid var(--gold);
  padding: 14px 16px;
  border-radius: 6px;
  margin: 0;
  white-space: pre-line;
}

/* === Footer === */
.site-footer {
  text-align: center;
  padding: 16px;
  color: var(--ink-dim);
  font-size: 12px;
  letter-spacing: 0.2em;
  opacity: 0.7;
}

/* === RWD 微調 === */
@media (max-width: 360px) {
  .tarot-board { gap: 8px; }
  :root { --card-w: 92px; --card-h: 145px; }
}
@media (min-width: 640px) {
  .home-buttons { grid-template-columns: 1fr 1fr; }
  .tarot-board { gap: 20px; }
}
