:root {
  --bg-primary: #0a0a12;
  --bg-secondary: #12121f;
  --bg-tertiary: #1a1a2e;
  --panel: #151522;
  --panel2: #1b192a;
  --gold-primary: #dcb970;
  --gold-light: #f0d78c;
  --gold-dark: #b89142;
  --gold-glow: rgba(220, 185, 112, .24);
  --accent-red: #e06459;
  --accent-green: #55bf84;
  --accent-blue: #64a5d8;
  --accent-purple: #9b78bc;
  --text-primary: #f5f3f0;
  --text-secondary: #aaa7b6;
  --text-muted: #747181;
  --line: rgba(220, 185, 112, .14);
  --bg: var(--bg-primary);
  --gold: var(--gold-primary);
  --text: var(--text-primary);
  --muted: var(--text-secondary);
  --red: var(--accent-red);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse at 12% 28%, rgba(106, 60, 138, .15) 0, transparent 40%),
    radial-gradient(ellipse at 86% 10%, rgba(48, 91, 132, .12) 0, transparent 38%),
    linear-gradient(180deg, #090911 0%, #11101c 54%, #0a0a12 100%);
  color: var(--text-primary);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  font-size: 16px;
  line-height: 1.75;
}
body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  opacity: .22;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.14'/%3E%3C/svg%3E");
}
a { color: inherit; }
h1, h2, h3, h4 {
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  font-weight: 700;
  letter-spacing: .04em;
}

.cosmic-backdrop { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.cosmic-backdrop::before,
.cosmic-backdrop::after {
  position: absolute;
  border: 1px solid rgba(220, 185, 112, .09);
  border-radius: 50%;
  content: "";
}
.cosmic-backdrop::before { width: 340px; height: 340px; top: 12%; left: -190px; }
.cosmic-backdrop::after { width: 520px; height: 520px; right: -360px; top: 52%; }
.cosmic-backdrop span {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px rgba(255,255,255,.7);
  animation: twinkle 4s ease-in-out infinite;
}
.cosmic-backdrop span:nth-child(1) { left: 7%; top: 13%; }
.cosmic-backdrop span:nth-child(2) { left: 18%; top: 67%; animation-delay: -1s; }
.cosmic-backdrop span:nth-child(3) { left: 29%; top: 31%; animation-delay: -2.2s; }
.cosmic-backdrop span:nth-child(4) { left: 41%; top: 83%; animation-delay: -.6s; }
.cosmic-backdrop span:nth-child(5) { left: 51%; top: 17%; animation-delay: -3s; }
.cosmic-backdrop span:nth-child(6) { left: 62%; top: 59%; animation-delay: -1.6s; }
.cosmic-backdrop span:nth-child(7) { left: 73%; top: 28%; animation-delay: -2.6s; }
.cosmic-backdrop span:nth-child(8) { left: 81%; top: 76%; animation-delay: -.3s; }
.cosmic-backdrop span:nth-child(9) { left: 91%; top: 11%; animation-delay: -1.8s; }
.cosmic-backdrop span:nth-child(10) { left: 95%; top: 48%; animation-delay: -3.5s; }
.cosmic-backdrop span:nth-child(11) { left: 34%; top: 8%; animation-delay: -2s; }
.cosmic-backdrop span:nth-child(12) { left: 13%; top: 91%; animation-delay: -.8s; }
@keyframes twinkle { 0%,100% { opacity: .18; transform: scale(.7); } 50% { opacity: .85; transform: scale(1.4); } }

.oracle-nav {
  min-height: 68px;
  border-bottom: 1px solid rgba(220, 185, 112, .11);
  background: rgba(9, 9, 17, .82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.navbar-brand { color: var(--gold-light) !important; font-family: "Noto Serif TC", serif; font-weight: 700; letter-spacing: .08em; }
.navbar-toggler { min-width: 44px; min-height: 44px; border-color: var(--line); }
.nav-link { position: relative; padding: .75rem 1rem !important; color: var(--text-secondary) !important; font-size: .9rem; }
.nav-link::after { position: absolute; right: 1rem; bottom: .45rem; left: 1rem; height: 1px; content: ""; background: var(--gold-primary); transform: scaleX(0); transition: transform .25s ease; }
.nav-link:hover, .nav-link:focus { color: var(--gold-light) !important; }
.nav-link:hover::after { transform: scaleX(1); }

main { position: relative; z-index: 1; }
main > .container { max-width: 1240px; padding-top: 92px; padding-bottom: 86px; }
section { margin: 4.5rem 0 7rem; }
.eyebrow, .section-kicker { color: var(--gold-primary); font-size: .72rem; font-weight: 700; letter-spacing: .2em; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.75rem; }
.section-heading h2 { margin: .25rem 0 0; font-size: clamp(1.55rem, 3vw, 2.2rem); }
.section-heading > a { min-height: 44px; padding: .55rem 0; color: var(--text-secondary); text-decoration: none; white-space: nowrap; }
.section-heading > a:hover { color: var(--gold-light); }

.hero { position: relative; display: grid; min-height: min(660px, calc(100vh - 92px)); place-content: center; margin: 0; padding: 5rem 1rem 8rem; }
.hero::after { position: absolute; right: 10%; bottom: 4rem; left: 10%; height: 1px; content: ""; background: linear-gradient(90deg, transparent, rgba(220,185,112,.25), transparent); }
.hero h1, .page-head h1 {
  margin: .55rem 0 1rem;
  color: var(--text-primary);
  font-size: clamp(3rem, 9vw, 6.5rem);
  line-height: 1.08;
  text-shadow: 0 0 38px rgba(220,185,112,.12);
}
.hero-lead { max-width: 560px; margin: 0 auto; color: var(--text-secondary); font-size: 1.05rem; }
.hero-actions { display: flex; align-items: center; justify-content: center; gap: 1.5rem; margin-top: 2rem; }
.btn-gold, .date-form button {
  min-height: 46px;
  border: 1px solid rgba(240,215,140,.55);
  border-radius: 4px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
  box-shadow: 0 10px 28px rgba(0,0,0,.3), 0 0 24px var(--gold-glow);
  color: #17121a;
  font-weight: 700;
  transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
}
.btn-gold { padding: .68rem 1.35rem; }
.btn-gold:hover, .date-form button:hover { color: #08080d; filter: brightness(1.08); transform: translateY(-2px); box-shadow: 0 14px 34px rgba(0,0,0,.36), 0 0 34px var(--gold-glow); }
.text-link { min-height: 44px; padding: .55rem 0; border-bottom: 1px solid var(--line); color: var(--text-secondary); text-decoration: none; }
.text-link:hover { color: var(--gold-light); border-color: var(--gold-primary); }
.hero-orbit { position: absolute; width: 260px; height: 260px; top: 50%; left: 50%; z-index: -1; border: 1px solid rgba(220,185,112,.11); border-radius: 50%; transform: translate(-50%,-54%); }
.hero-orbit::before { position: absolute; inset: 25px; border: 1px dashed rgba(220,185,112,.1); border-radius: 50%; content: ""; }
.hero-orbit span { position: absolute; top: -20px; left: 44%; color: var(--gold-light); font-size: 2.2rem; filter: drop-shadow(0 0 14px var(--gold-glow)); animation: float 6s ease-in-out infinite; }
.hero-orbit b { position: absolute; right: 6px; bottom: 33px; color: var(--gold-primary); font-size: .9rem; animation: twinkle 3s infinite; }

.fortune-preview-grid, .fortune-detail-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.fortune-preview-card, .fortune-detail-card, .feature-card, .almanac-card, .oracle-card, .feature, .result-card, .form-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(27,25,42,.9), rgba(15,15,27,.88));
  box-shadow: 0 18px 50px rgba(0,0,0,.16);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.fortune-preview-card::before, .fortune-detail-card::before, .feature-card::before, .almanac-card::before, .oracle-card::before, .feature::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  content: "";
  opacity: .55;
  background: linear-gradient(90deg, transparent, rgba(240,215,140,.75), transparent);
  transform: scaleX(.4);
  transition: opacity .35s ease, transform .35s ease;
}
.fortune-preview-card, .feature-card { color: var(--text-primary); text-decoration: none; transition: transform .35s cubic-bezier(.2,.8,.2,1), border-color .35s ease, box-shadow .35s ease; }
.fortune-preview-card:hover, .fortune-detail-card:hover, .feature-card:hover, .oracle-card:hover, .feature:hover {
  border-color: rgba(220,185,112,.35);
  color: var(--text-primary);
  transform: translateY(-5px);
  box-shadow: 0 22px 60px rgba(0,0,0,.36), 0 0 34px rgba(220,185,112,.08);
}
.fortune-preview-card:hover::before, .fortune-detail-card:hover::before, .feature-card:hover::before { opacity: 1; transform: scaleX(1); }
.fortune-preview-card { display: flex; flex-direction: column; padding: 1.2rem; }
.preview-header, .fortune-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid rgba(255,255,255,.07); }
.zodiac-title, .fortune-identity { display: flex; align-items: center; gap: .8rem; }
.zodiac-mark, .fortune-mark, .feature-icon {
  display: grid;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(220,185,112,.3);
  border-radius: 50%;
  place-items: center;
  background: radial-gradient(circle, rgba(220,185,112,.14), transparent 70%);
  color: var(--gold-light);
  font-family: "Noto Serif TC", serif;
  font-size: 1.15rem;
  box-shadow: inset 0 0 18px rgba(220,185,112,.06);
}
.zodiac-title small, .fortune-identity small { display: block; color: var(--text-muted); font-size: .68rem; letter-spacing: .12em; }
.zodiac-title h3, .fortune-identity h3 { margin: .05rem 0 0; font-size: 1.25rem; }

.score-ring { --ring-size: 92px; position: relative; flex: 0 0 var(--ring-size); width: var(--ring-size); height: var(--ring-size); }
.score-ring-sm { --ring-size: 74px; }
.score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-ring circle { fill: none; stroke-width: 6; }
.ring-bg { stroke: rgba(255,255,255,.08); }
.ring-progress { stroke: var(--gold-primary); stroke-linecap: round; stroke-dasharray: 276.46; stroke-dashoffset: 276.46; filter: drop-shadow(0 0 4px rgba(220,185,112,.45)); transition: stroke-dashoffset 1.2s cubic-bezier(.2,.8,.2,1); }
.score-ring.is-visible .ring-progress { stroke-dashoffset: var(--score-offset); }
.score-ring > span { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1; }
.score-ring b { color: var(--gold-light); font-family: "Noto Serif TC", serif; font-size: 1.55rem; }
.score-ring-sm b { font-size: 1.25rem; }
.score-ring small { margin-top: .2rem; color: var(--text-muted); font-size: .62rem; }

.preview-scores { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem 1rem; margin: 1rem 0; }
.mini-score { display: grid; grid-template-columns: 32px 1fr; align-items: center; gap: .5rem; }
.mini-score > span { color: var(--text-secondary); font-size: .72rem; }
.mini-bar, .score-bar { height: 5px; overflow: hidden; border-radius: 5px; background: rgba(255,255,255,.07); }
.mini-bar i, .score-bar i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold-dark), var(--gold-light)); box-shadow: 0 0 8px var(--gold-glow); transition: width 1s ease; }
.mini-bar.is-visible i, .score-bar.is-visible i { width: var(--bar-width); }
.preview-tips { display: grid; gap: .45rem; margin-top: auto; padding-top: .9rem; border-top: 1px solid rgba(255,255,255,.07); color: var(--text-secondary); font-size: .78rem; }
.preview-tips span, .yi-ji-mini span { display: flex; align-items: flex-start; gap: .55rem; }
.preview-tips b, .yi-ji-mini b { display: grid; flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%; place-items: center; font-size: .7rem; }
.yi b, .yi-ji-mini .yi b { background: rgba(85,191,132,.12); color: var(--accent-green); }
.ji b, .yi-ji-mini .ji b { background: rgba(224,100,89,.12); color: var(--accent-red); }

.feature-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.feature-card { display: grid; min-height: 130px; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem; padding: 1.25rem; }
.feature-card h3 { margin: 0 0 .25rem; font-size: 1.1rem; }
.feature-card p, .feature p, .oracle-card p { margin: 0; color: var(--text-secondary); font-size: .84rem; line-height: 1.65; }
.card-arrow { align-self: start; color: var(--gold-primary); font-size: 1.2rem; transition: transform .25s ease; }
.feature-card:hover .card-arrow { transform: translate(2px,-2px); }

.almanac-card { display: grid; grid-template-columns: 1fr; max-width: 880px; margin: 0 auto; padding: 1.35rem; }
.almanac-date { display: flex; align-items: center; justify-content: space-between; padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); color: var(--text-secondary); }
.almanac-date strong { color: var(--gold-light); font-family: "Noto Serif TC", serif; font-size: 2.7rem; line-height: 1; }
.almanac-info { padding-top: 1.25rem; }
.almanac-ganzhi { margin: 0 0 .3rem; color: var(--text-primary); font-family: "Noto Serif TC", serif; font-size: 1.1rem; }
.almanac-officer, .almanac-directions { color: var(--text-secondary); font-size: .85rem; }
.almanac-yi-ji { display: grid; gap: .75rem; margin: 1.2rem 0; }
.almanac-yi-ji > div { display: grid; grid-template-columns: 32px 1fr; align-items: start; gap: .75rem; color: var(--text-secondary); }
.almanac-yi-ji b { display: grid; width: 30px; height: 30px; border-radius: 50%; place-items: center; }

.page-head { max-width: 850px; margin: 3rem auto 5rem; text-align: center; }
.page-head h1 { font-size: clamp(2.6rem, 7vw, 5rem); }
.page-head p { color: var(--text-secondary); }
.date-form { display: flex; justify-content: center; max-width: 330px; margin: 1.7rem auto 0; }
.date-form input { min-width: 0; min-height: 46px; flex: 1; border: 1px solid var(--line); border-right: 0; border-radius: 4px 0 0 4px; outline: 0; background: rgba(18,18,31,.9); color: var(--text-primary); color-scheme: dark; padding: .65rem .8rem; }
.date-form input:focus { border-color: rgba(220,185,112,.5); box-shadow: 0 0 0 3px rgba(220,185,112,.08); }
.date-form button { padding: .6rem 1.1rem; border-radius: 0 4px 4px 0; }
.fortune-section { margin: 3rem 0 7rem; }
.fortune-detail-card { padding: 1.25rem; transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease; }
.fortune-header { margin-bottom: 1.25rem; }
.score-bars { display: grid; gap: .62rem; margin-bottom: 1.25rem; }
.score-row { display: grid; grid-template-columns: 60px 1fr 30px; align-items: center; gap: .65rem; color: var(--text-secondary); font-size: .78rem; }
.score-row b { color: var(--gold-primary); font-size: .78rem; text-align: right; }
.fortune-content { max-height: 250px; margin-bottom: 1.25rem; padding-right: .4rem; overflow-y: auto; color: #d8d4dc; font-size: .9rem; line-height: 1.85; scrollbar-color: var(--line) transparent; }
/* On zodiac/horoscope detail pages the card is one-of-three — no need to truncate. */
.fortune-section > .fortune-detail-card .fortune-content { max-height: none; overflow: visible; padding-right: 0; }
.fortune-meta { padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.07); }
.lucky-items { display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: .9rem; }
.lucky-items > span { display: inline-flex; align-items: center; gap: .35rem; padding: .28rem .55rem; border: 1px solid rgba(255,255,255,.07); border-radius: 4px; background: rgba(255,255,255,.025); color: var(--text-secondary); font-size: .74rem; }
.lucky-items i { color: var(--gold-primary); font-style: normal; }
.yi-ji-mini { display: grid; gap: .5rem; color: var(--text-secondary); font-size: .77rem; }
.read-more { display: inline-flex; min-height: 44px; align-items: center; gap: .45rem; margin-top: .8rem; color: var(--gold-primary); font-size: .85rem; font-weight: 700; text-decoration: none; }
.read-more:hover { color: var(--gold-light); }

.result-card, .form-card { padding: clamp(1.25rem,4vw,2.5rem); margin-bottom: 1.5rem; }
.oracle-card, .feature { padding: 1.4rem; color: var(--text-primary); text-decoration: none; transition: .3s ease; }
.score { position: absolute; right: 1.2rem; color: var(--gold-primary); font-size: 1.3rem; }
.result-title { display: flex; align-items: center; justify-content: space-between; }
.result-title strong { color: var(--gold-primary); font-size: 1.8rem; }
.scores > div { display: grid; grid-template-columns: 50px 1fr 35px; align-items: center; gap: 1rem; margin: .7rem 0; }
meter { width: 100%; accent-color: var(--gold-primary); }
.tool-layout { display: grid; grid-template-columns: 1fr; align-items: start; gap: 1.5rem; }
.form-control, .form-select { min-height: 44px; border-color: var(--line) !important; background: rgba(10,10,18,.76) !important; color: var(--text-primary) !important; }
.form-control:focus, .form-select:focus { border-color: rgba(220,185,112,.45) !important; box-shadow: 0 0 0 .2rem rgba(220,185,112,.08) !important; }
.form-label { color: var(--gold-primary); }
.form-check-input:checked { border-color: var(--accent-red); background-color: var(--accent-red); }
.pillars, .elements, .characters, .grid-values { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1rem 0 2rem; }
.pillars > div, .characters > div { min-width: 90px; flex: 1; padding: 1rem; border: 1px solid var(--line); background: rgba(10,10,18,.62); text-align: center; }
.pillars span, .characters span { display: block; color: var(--text-secondary); }
.pillars strong, .characters strong { color: var(--gold-primary); font-size: 2rem; }
.elements > div, .grid-values > div { display: flex; width: 70px; height: 70px; flex-direction: column; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 50%; }
.elements span, .grid-values b { color: var(--gold-primary); }
.tarot-area { display: grid; min-height: 430px; place-items: center; }
.tarot-back { display: flex; width: 210px; height: 350px; flex-direction: column; align-items: center; justify-content: center; gap: 2rem; border: 2px solid var(--gold-primary); border-radius: 8px; background: repeating-radial-gradient(circle,#291c34 0 6px,#17101f 7px 12px); box-shadow: 0 20px 60px #000; color: var(--gold-primary); }
.tarot-back span { font-size: 5rem; }
.tarot-result { max-width: 600px; text-align: center; }
.almanac { display: grid; max-width: 850px; grid-template-columns: 1fr; gap: 2rem; margin: auto; }
.calendar-date { display: flex; flex-direction: column; align-items: center; justify-content: center; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.calendar-date strong { color: var(--gold-primary); font-size: 3.5rem; }
.yi-ji > div { display: grid; grid-template-columns: 45px 1fr; align-items: center; }
.yi-ji b { color: var(--gold-primary); font-size: 1.4rem; }

.animate-in { animation: fadeInUp .65s ease both; }
.reveal-card { opacity: .72; transform: translateY(12px); }
.reveal-card.is-visible { opacity: 1; transform: translateY(0); }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

footer { position: relative; z-index: 1; padding: 1.5rem 0; border-top: 1px solid var(--line); color: var(--text-muted); font-size: .78rem; }
.mobile-dock { display: grid; position: fixed; right: .75rem; bottom: max(.75rem, env(safe-area-inset-bottom)); left: .75rem; z-index: 1040; min-height: 62px; grid-template-columns: repeat(4,1fr); border: 1px solid rgba(220,185,112,.2); border-radius: 8px; background: rgba(12,12,21,.92); box-shadow: 0 16px 45px rgba(0,0,0,.45); backdrop-filter: blur(18px); }
.mobile-dock a { display: flex; min-width: 0; min-height: 56px; flex-direction: column; align-items: center; justify-content: center; color: var(--text-secondary); font-size: .68rem; text-decoration: none; }
.mobile-dock span { color: var(--gold-primary); font-family: "Noto Serif TC", serif; font-size: 1.15rem; line-height: 1.2; }
.mobile-dock a:hover { color: var(--gold-light); }

@media (min-width: 650px) {
  .fortune-preview-grid, .fortune-detail-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .feature-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .almanac-card { grid-template-columns: 180px 1fr; padding: 1.75rem; }
  .almanac-date { flex-direction: column; justify-content: center; padding: 0 1.75rem 0 0; border-right: 1px solid var(--line); border-bottom: 0; }
  .almanac-info { padding: 0 0 0 1.75rem; }
  .tool-layout { grid-template-columns: minmax(260px,360px) 1fr; }
  .almanac { grid-template-columns: 220px 1fr; gap: 2.5rem; }
  .calendar-date { padding: 0; border-right: 1px solid var(--line); border-bottom: 0; }
}
@media (min-width: 992px) {
  .fortune-preview-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .feature-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .feature-card { min-height: 230px; grid-template-columns: 1fr auto; grid-template-rows: auto 1fr; align-items: start; }
  .feature-card .feature-icon { grid-column: 1; }
  .feature-card > div { grid-column: 1 / -1; }
  .feature-card .card-arrow { grid-column: 2; grid-row: 1; }
  .fortune-detail-card { padding: 1.5rem; }
  .mobile-dock { display: none; }
}
@media (max-width: 991.98px) {
  body { padding-bottom: 78px; }
  .oracle-nav .navbar-collapse { margin: .5rem -.75rem -.5rem; padding: .5rem .75rem 1rem; border-top: 1px solid var(--line); background: rgba(9,9,17,.96); }
  footer { padding-bottom: 1rem; }
}
@media (max-width: 649px) {
  main > .container { width: 100%; padding-top: 78px; padding-right: 1rem; padding-bottom: 45px; padding-left: 1rem; }
  section { margin: 3.5rem 0 5rem; }
  .hero { min-height: 590px; padding: 4rem .25rem 7rem; }
  .hero h1 { font-size: 3.4rem; }
  .hero-actions { flex-direction: column; gap: .65rem; }
  .hero-actions .btn-gold { width: min(100%, 280px); }
  .hero-orbit { width: 220px; height: 220px; }
  .section-heading { align-items: center; }
  .section-heading > a { font-size: .8rem; }
  .preview-scores { grid-template-columns: 1fr; }
  .page-head { margin: 2rem auto 4rem; }
  .page-head h1 { font-size: 2.8rem; }
  .fortune-content { max-height: 220px; }
  .fortune-header { align-items: flex-start; }
  .score-ring { --ring-size: 80px; }
  .score-ring-sm { --ring-size: 70px; }
  .yi-ji-mini { font-size: .73rem; }
}
@media (hover: none) {
  .fortune-preview-card:hover, .fortune-detail-card:hover, .feature-card:hover, .oracle-card:hover, .feature:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal-card { opacity: 1; transform: none; }
  .ring-progress { stroke-dashoffset: var(--score-offset); }
  .mini-bar i, .score-bar i { width: var(--bar-width); }
}

/* =============================================================
   Zodiac/Horoscope detail page (P0 redesign 2026-07-04)
   ============================================================= */
.breadcrumb-trail {
  display: flex; align-items: center; flex-wrap: wrap; gap: .35rem;
  margin-top: 1.5rem; color: var(--text-muted); font-size: .82rem; letter-spacing: .04em;
}
.breadcrumb-trail a { color: var(--text-secondary); text-decoration: none; border-bottom: 1px solid transparent; }
.breadcrumb-trail a:hover { color: var(--gold-light); border-bottom-color: var(--gold-primary); }
.breadcrumb-trail span[aria-hidden="true"] { color: var(--text-muted); }
.breadcrumb-trail span[aria-current="page"] { color: var(--gold-light); }

.zodiac-profile {
  display: grid; grid-template-columns: 96px 1fr; gap: 1.5rem; align-items: center;
  margin: 0 0 2.5rem; padding: 1.5rem 1.75rem;
  border: 1px solid var(--line); border-radius: 12px;
  background: linear-gradient(135deg, rgba(106,60,138,.16), rgba(15,15,27,.92) 60%);
  box-shadow: 0 18px 50px rgba(0,0,0,.18);
}
.zodiac-profile-glyph {
  display: grid; place-content: center;
  width: 96px; height: 96px;
  border: 1px solid var(--gold-primary); border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(220,185,112,.18), transparent 65%);
  color: var(--gold-light);
  font-family: "Noto Serif TC", "Songti TC", serif;
  font-size: 2.6rem; line-height: 1;
  box-shadow: inset 0 0 24px rgba(220,185,112,.15), 0 0 28px var(--gold-glow);
}
.zodiac-profile-body h2 { margin: 0 0 .5rem; font-size: 1.35rem; color: var(--text-primary); }
.zodiac-profile-line { margin: 0 0 .65rem; color: var(--text-secondary); font-size: .88rem; letter-spacing: .04em; }
.zodiac-profile-body p { margin: 0; color: var(--text-secondary); line-height: 1.7; }

.fortune-crosslinks {
  margin: 4rem 0 2rem; padding: 1.75rem 1.75rem 2rem;
  border: 1px solid var(--line); border-radius: 12px;
  background: linear-gradient(145deg, rgba(27,25,42,.6), rgba(15,15,27,.7));
}
.fortune-crosslinks h3 { margin: 0 0 1rem; font-size: 1.05rem; color: var(--gold-light); }
.fortune-crosslinks-tip { margin: 1.25rem 0 .85rem; color: var(--text-secondary); font-size: .9rem; }
.fortune-crosslinks-tip a { color: var(--gold-light); border-bottom: 1px solid var(--gold-primary); }
.zodiac-quicknav { display: flex; flex-wrap: wrap; gap: .55rem; }
.zodiac-quicknav-link {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 48px; min-height: 38px; padding: .4rem .9rem;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(15,15,27,.6); color: var(--text-secondary);
  font-size: .9rem; text-decoration: none;
  transition: all .25s ease;
}
.zodiac-quicknav-link:hover { color: var(--gold-light); border-color: var(--gold-primary); background: rgba(220,185,112,.08); }
.zodiac-quicknav-link.is-current { color: #17121a; background: linear-gradient(135deg, var(--gold-light), var(--gold-dark)); border-color: transparent; font-weight: 700; }

/* AdSense slots */
.ad-slot { margin: 1.5rem auto; text-align: center; min-height: 60px; }
.ad-slot-inline { margin: 2.25rem auto; max-width: 100%; }
@media (min-width: 768px) {
  .zodiac-profile { grid-template-columns: 120px 1fr; gap: 2rem; padding: 2rem 2.25rem; }
  .zodiac-profile-glyph { width: 120px; height: 120px; font-size: 3.2rem; }
  .zodiac-profile-body h2 { font-size: 1.6rem; }
}
@media (max-width: 649px) {
  .zodiac-profile { grid-template-columns: 80px 1fr; gap: 1rem; padding: 1.25rem; }
  .zodiac-profile-glyph { width: 80px; height: 80px; font-size: 2.1rem; }
  .fortune-crosslinks { padding: 1.25rem 1.25rem 1.5rem; }
}

/* Daily page: 2-column on tablet, 3-column on wide screens for the long grid */
@media (min-width: 768px) {
  .fortune-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
}
@media (min-width: 992px) {
  .fortune-detail-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Daily page: date-form nicer styling */
.date-form { display: inline-flex; align-items: center; gap: .65rem; margin-top: 1.5rem; }
.date-form input[type="date"] {
  background: rgba(15,15,27,.7); color: var(--text-primary);
  border: 1px solid var(--line); border-radius: 4px;
  padding: .55rem .75rem; font-size: .95rem; min-height: 46px;
  color-scheme: dark;
}

/* === Share Buttons === */
.share-bar{display:flex;align-items:center;gap:.5rem;padding:1rem 0;border-top:1px solid var(--line);margin-top:2rem;flex-wrap:wrap}
.share-label{color:var(--text-muted);font-size:.85rem}
.share-btn{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:8px;border:1px solid var(--line);background:rgba(255,255,255,.05);cursor:pointer;font-size:1rem;transition:all .2s;text-decoration:none}
.share-btn:hover{background:rgba(255,255,255,.1);transform:translateY(-2px)}

/* === Tarot Spreads === */
.tarot-spread-picker{display:flex;gap:.5rem;justify-content:center;margin-bottom:1rem;flex-wrap:wrap}
.spread-btn{padding:.5rem 1.2rem;border-radius:20px;border:1px solid var(--line);background:transparent;color:var(--text-secondary);cursor:pointer;transition:all .2s;font-size:.9rem}
.spread-btn.active,.spread-btn:hover{background:var(--accent-gold);color:#0f0f1b;border-color:var(--accent-gold)}
.spread-desc{text-align:center;color:var(--text-muted);margin-bottom:1.5rem;font-size:.9rem}
.tarot-deck{display:flex;justify-content:center}
.tarot-results{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:1rem}
.tarot-result-card{background:rgba(255,255,255,.04);border:1px solid var(--line);border-radius:12px;padding:1.5rem;animation:fadeUp .4s ease both}
.tarot-result-card .eyebrow{color:var(--accent-gold);font-size:.8rem;text-transform:uppercase;letter-spacing:.05em}
.tarot-result-card h3{margin:.3rem 0;font-size:1.2rem}
.tarot-result-card small{color:var(--text-muted)}
.tarot-result-card p{margin-top:.8rem;line-height:1.7;color:var(--text-secondary)}
.card-aspects{display:flex;flex-direction:column;gap:.4rem;margin-top:1rem;font-size:.85rem;color:var(--text-muted)}

/* === Tarot Detail === */
.tarot-detail{display:grid;grid-template-columns:280px 1fr;gap:2rem;align-items:start}
.tarot-card-full .card-visual{background:linear-gradient(135deg,#1a1a2e,#16213e);border:2px solid var(--accent-gold);border-radius:16px;padding:3rem 2rem;text-align:center;aspect-ratio:2/3;display:flex;flex-direction:column;justify-content:center;align-items:center}
.card-visual .card-number{font-size:4rem;color:var(--accent-gold);font-weight:300}
.card-visual .card-name{font-size:1.5rem;margin-top:.5rem}
.meaning-grid{display:grid;grid-template-columns:1fr 1fr;gap:1rem;margin:1rem 0}
.meaning-section{background:rgba(255,255,255,.04);border-radius:10px;padding:1.2rem}
.meaning-section h3{margin-bottom:.5rem;font-size:1rem}
.aspects-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:1rem;margin:1rem 0}
.aspect-card{background:rgba(255,255,255,.04);border-radius:10px;padding:1.2rem;text-align:center}
.aspect-icon{font-size:1.5rem;display:block;margin-bottom:.5rem}

/* === Yearly Fortune === */
.yearly-overview{margin-bottom:2rem}
.year-summary{display:flex;gap:1.5rem;justify-content:center;flex-wrap:wrap}
.summary-stat{background:rgba(255,255,255,.04);border:1px solid var(--line);border-radius:12px;padding:1.2rem 2rem;text-align:center}
.summary-stat.best{border-color:var(--accent-gold)}
.summary-stat.caution{border-color:#e74c3c}
.stat-value{display:block;font-size:1.8rem;font-weight:600}
.stat-label{color:var(--text-muted);font-size:.8rem}
.yearly-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:1rem}
.monthly-card{background:rgba(255,255,255,.04);border:1px solid var(--line);border-radius:12px;padding:1.2rem}
.month-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:.8rem}
.month-tip{font-size:.85rem;color:var(--text-muted);line-height:1.5;margin-top:.8rem}

/* === About Page === */
.about-content{display:grid;gap:1.5rem}
.about-card{background:rgba(255,255,255,.04);border:1px solid var(--line);border-radius:12px;padding:1.5rem 2rem}
.about-card h2{margin-bottom:1rem;color:var(--accent-gold)}
.about-card p{line-height:1.8;color:var(--text-secondary);margin-bottom:.8rem}
.about-card .feature-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:1rem;margin-top:1rem}
.about-card .feature-item{text-align:center;padding:1rem}

/* === Related Links === */
.related-links{margin-top:2rem;padding-top:1.5rem;border-top:1px solid var(--line)}
.related-links h2{font-size:1.1rem;margin-bottom:1rem}
.related-grid{display:flex;flex-wrap:wrap;gap:.5rem}
.related-card{padding:.5rem 1rem;border-radius:8px;border:1px solid var(--line);color:var(--text-secondary);text-decoration:none;font-size:.9rem;transition:all .2s}
.related-card:hover{background:rgba(255,255,255,.05);color:var(--text-primary)}

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

/* === Responsive === */
@media(max-width:768px){
.tarot-detail{grid-template-columns:1fr}
.meaning-grid{grid-template-columns:1fr}
}

/* === Combo Query === */
.combo-query{margin:2rem 0}
.combo-form{background:rgba(255,255,255,.04);border:1px solid var(--line);border-radius:12px;padding:1.5rem;text-align:center}
.combo-selects{display:flex;align-items:end;justify-content:center;gap:1rem;margin-bottom:1rem;flex-wrap:wrap}
.combo-field{display:flex;flex-direction:column;gap:.3rem}
.combo-field label{font-size:.8rem;color:var(--text-muted)}
.combo-field select{background:rgba(15,15,27,.7);color:var(--text-primary);border:1px solid var(--line);border-radius:8px;padding:.6rem 1rem;font-size:1rem;min-width:140px}
.combo-x{color:var(--accent-gold);font-size:1.2rem;padding-bottom:.5rem}

/* === Tarot Override === */
.tarot-area{min-height:300px}
.tarot-result-card{text-align:center}
.tarot-result-card h3{color:var(--gold);font-size:1.3rem}
.tarot-result-card small{display:block;color:var(--accent-purple);font-weight:600;margin:.2rem 0}
.tarot-result-card p{color:var(--text-primary);font-size:.95rem;line-height:1.7}
.btn-outline-light{border:1px solid var(--line);color:var(--text-primary);background:transparent;padding:.6rem 1.5rem;border-radius:8px;cursor:pointer;transition:all .2s}
.btn-outline-light:hover{background:rgba(255,255,255,.08)}

/* 三牌阵 - 横排 */
.tarot-results[data-count="3"]{grid-template-columns:repeat(3,1fr)}

/* 十牌阵 - 两排五张 */
.tarot-results[data-count="10"]{grid-template-columns:repeat(5,1fr)}
.tarot-results[data-count="10"] .tarot-result-card{padding:1rem}
.tarot-results[data-count="10"] .tarot-result-card h3{font-size:1rem}
.tarot-results[data-count="10"] .tarot-result-card p{font-size:.8rem;max-height:120px;overflow:hidden}

@media(max-width:768px){
.tarot-results[data-count="3"]{grid-template-columns:1fr}
.tarot-results[data-count="10"]{grid-template-columns:repeat(2,1fr)}
}
