/* ============ 旺來開運所．東方玄學紅金風 ============ */
:root {
  --bg-deep: #170404;
  --bg-main: #24080a;
  --bg-card: #2e0d0e;
  --bg-card2: #38100f;
  --gold: #d9a441;
  --gold-bright: #f2cd7b;
  --gold-dim: #8a6a2f;
  --red-seal: #b3261e;
  --ink: #f3e5c8;
  --ink-dim: #c8ab7d;
  --good: #3fa66b;
  --mid: #d9a441;
  --bad: #c0504d;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Noto Serif TC", "PMingLiU", "MingLiU", "Microsoft JhengHei", serif;
  background: radial-gradient(1200px 800px at 50% -10%, #3a0f10 0%, var(--bg-main) 45%, var(--bg-deep) 100%);
  color: var(--ink);
  min-height: 100vh;
  letter-spacing: .03em;
  line-height: 1.75;
}
/* 雲紋底紋 */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; opacity: .05; z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='%23d9a441' stroke-width='1.2'%3E%3Cpath d='M20 60 q10 -22 32 -14 q4 -18 24 -14 q20 4 18 22 q18 -2 20 14 q2 16 -16 18 l-62 0 q-18 -4 -16 -26z'/%3E%3Cpath d='M90 140 q8 -16 24 -10 q3 -13 18 -10 q15 3 13 16 q13 -1 15 10 q1 12 -12 13 l-46 0 q-13 -3 -12 -19z'/%3E%3C/g%3E%3C/svg%3E");
}
/* 金箔飄落 */
.gold-dust { position: fixed; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.gold-dust i {
  position: absolute; top: -12px; width: 5px; height: 5px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffe9a8, var(--gold) 60%, transparent);
  animation: fall linear infinite; opacity: .6;
}
@keyframes fall {
  0% { transform: translateY(-10px) translateX(0) rotate(0); opacity: 0; }
  8% { opacity: .7; }
  100% { transform: translateY(105vh) translateX(38px) rotate(300deg); opacity: 0; }
}

.wrap { position: relative; z-index: 2; max-width: 860px; margin: 0 auto; padding: 26px 18px 60px; }

/* ---------- 頁首 ---------- */
.site-head { text-align: center; padding: 18px 0 8px; }
.site-title {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: 44px; font-weight: 900; color: var(--gold-bright);
  text-shadow: 0 0 24px rgba(217, 164, 65, .35), 0 2px 2px rgba(0,0,0,.6);
  letter-spacing: .18em;
}
.seal {
  width: 52px; height: 52px; background: linear-gradient(160deg, #c53a30, var(--red-seal));
  color: #ffe9c9; font-size: 20px; font-weight: 700; line-height: 1.15;
  display: flex; align-items: center; justify-content: center; text-align: center;
  border-radius: 8px; box-shadow: inset 0 0 0 2px rgba(255, 233, 201, .8), 0 3px 10px rgba(0,0,0,.5);
  letter-spacing: 0; padding: 4px; transform: rotate(-3deg);
}
.site-sub { color: var(--ink-dim); font-size: 15px; letter-spacing: .5em; margin-top: 6px; text-indent: .5em; }
.byline { margin-top: 10px; color: #e6c27a; font-size: 16.5px; letter-spacing: .1em; }
.byline a { color: var(--gold-bright); font-weight: 700; font-size: 17.5px; text-decoration: none; border-bottom: 1px dashed var(--gold); text-shadow: 0 0 12px rgba(217,164,65,.35); }
.byline a:hover { border-bottom-style: solid; }
.foot a { color: var(--gold-bright); text-decoration: none; border-bottom: 1px dashed var(--gold-dim); }
.head-divider {
  width: min(420px, 80%); margin: 14px auto 0; height: 14px; position: relative;
}
.head-divider::before { content: ''; position: absolute; left: 0; right: 0; top: 6px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.head-divider::after { content: '❖'; position: absolute; left: 50%; transform: translateX(-50%); top: -4px; color: var(--gold); background: transparent; font-size: 13px; }

/* ---------- 畫面 ---------- */
.screen { display: none; animation: fadein .5s ease; }
.screen.active { display: block; }
@keyframes fadein { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- 首頁 ---------- */
.hero { text-align: center; padding: 30px 0 10px; }
.hero-frame {
  border: 1px solid var(--gold-dim); position: relative; padding: 40px 26px 34px; border-radius: 4px;
  background: linear-gradient(180deg, rgba(217,164,65,.06), rgba(0,0,0,0) 40%);
}
.hero-frame::before, .hero-frame::after,
.hero-frame .corner::before, .hero-frame .corner::after {
  content: ''; position: absolute; width: 22px; height: 22px; border-color: var(--gold); border-style: solid;
}
.hero-frame::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.hero-frame::after { top: -1px; right: -1px; border-width: 2px 2px 0 0; }
.hero-frame .corner::before { bottom: -1px; left: -1px; border-width: 0 0 2px 2px; }
.hero-frame .corner::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }
.hero h2 { font-size: 26px; color: var(--gold-bright); letter-spacing: .12em; margin-bottom: 12px; }
.hero p.lead { color: var(--ink); max-width: 560px; margin: 0 auto 6px; }
.hero p.lead-dim { color: var(--ink-dim); font-size: 14px; max-width: 560px; margin: 0 auto; }
.sys-icons { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 14px; margin: 24px auto 6px; max-width: 640px; }
.sys-icons span {
  border: 1px solid var(--gold-dim); color: var(--gold-bright); font-size: 14px;
  padding: 6px 14px; border-radius: 999px; background: rgba(217,164,65,.07);
}
.btn-gold {
  display: inline-block; margin-top: 26px; cursor: pointer; border: none;
  font-family: inherit; font-size: 20px; letter-spacing: .25em; text-indent: .25em; font-weight: 700;
  color: #2b1503; padding: 14px 54px; border-radius: 999px;
  background: linear-gradient(180deg, #f7dd9b, var(--gold) 55%, #b8862f);
  box-shadow: 0 6px 22px rgba(217,164,65,.35), inset 0 1px 0 #fff3cf;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(217,164,65,.45), inset 0 1px 0 #fff3cf; }
.btn-ghost {
  cursor: pointer; border: 1px solid var(--gold-dim); color: var(--gold-bright); background: transparent;
  font-family: inherit; font-size: 15px; padding: 9px 22px; border-radius: 999px; letter-spacing: .1em;
  transition: background .15s ease;
}
.btn-ghost:hover { background: rgba(217,164,65,.1); }
.visit-line { margin-top: 22px; color: var(--ink-dim); font-size: 13.5px; letter-spacing: .08em; }
.visit-line b { color: var(--gold-bright); font-size: 15px; }
.disclaim { margin-top: 10px; color: #7d6647; font-size: 12px; }

/* 分析與統計說明 */
.explain { max-width: 640px; margin: 18px auto 0; text-align: left; border: 1px dashed var(--gold-dim); border-radius: 6px; background: rgba(0,0,0,.15); }
.explain summary { cursor: pointer; color: var(--gold); font-size: 14.5px; padding: 11px 16px; letter-spacing: .1em; list-style: none; }
.explain summary::before { content: '☰ '; color: var(--gold-dim); }
.explain[open] summary { border-bottom: 1px dashed rgba(217,164,65,.3); }
.explain-body { padding: 12px 16px 6px; }
.explain-body p { color: var(--ink-dim); font-size: 13.5px; line-height: 1.85; margin-bottom: 10px; }
.explain-body b { color: var(--gold-bright); font-weight: 600; }

/* 精簡版彈窗 */
#compact-modal { display: none; position: fixed; inset: 0; z-index: 90; background: rgba(10,2,2,.78); backdrop-filter: blur(3px); overflow-y: auto; padding: 30px 14px; }
#compact-modal.open { display: block; }
.compact-card {
  max-width: 560px; margin: 0 auto; border: 1px solid var(--gold); border-radius: 8px;
  background: linear-gradient(180deg, #331010, #240a0b); padding: 26px 24px 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,.7);
}
.cp-title { text-align: center; color: var(--gold-bright); font-size: 19px; letter-spacing: .15em; margin-bottom: 12px; }
.cp-name { text-align: center; font-size: 24px; color: var(--gold-bright); font-weight: 800; letter-spacing: .1em; margin-bottom: 4px; }
.cp-name span { display: block; font-size: 13px; color: var(--ink-dim); font-weight: 400; letter-spacing: .08em; margin-top: 2px; }
.cp-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 8px; margin: 10px 0 14px; }
.cp-chips span { border: 1px solid var(--gold-dim); border-radius: 999px; font-size: 12.5px; color: var(--ink); padding: 3px 12px; background: rgba(217,164,65,.06); }
.cp-scores { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 14px; }
.cp-scores > div { text-align: center; border: 1px solid rgba(217,164,65,.35); border-radius: 6px; padding: 8px 2px; background: rgba(0,0,0,.18); }
.cp-scores label { display: block; font-size: 12px; color: var(--gold); margin-bottom: 2px; }
.cp-scores b { font-size: 20px; color: var(--gold-bright); }
.cp-line { font-size: 14px; color: var(--ink); margin-bottom: 8px; line-height: 1.8; }
.cp-line b { color: var(--gold-bright); }
.cp-foot { margin-top: 14px; padding-top: 10px; border-top: 1px dashed rgba(217,164,65,.3); text-align: center; color: var(--ink-dim); font-size: 12.5px; line-height: 2; }
.cp-foot a { color: var(--gold-bright); }
.compact-actions { display: flex; justify-content: center; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
@media (max-width: 480px) { .cp-scores { grid-template-columns: repeat(3, 1fr); } }

/* ---- 精簡版 Plan C：性格段 / 今日運勢 / 分數 chip / 開運一行 ---- */
.cp-section { margin: 14px 0; padding: 12px 14px; border: 1px solid rgba(217,164,65,.28); border-radius: 6px; background: rgba(217,164,65,.04); }
.cp-section-title { color: var(--gold-bright); font-weight: 700; letter-spacing: .08em; font-size: 14px; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px dashed rgba(217,164,65,.28); }
.cp-persona p { font-size: 14px; color: var(--ink); line-height: 1.85; margin: 6px 0; }
.cp-persona b { color: var(--gold-bright); }
.cp-today p { font-size: 14px; color: var(--ink); line-height: 1.8; margin: 6px 0; }
.cp-today b { color: var(--gold-bright); }
.cp-today-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.cp-today-score { font-size: 30px; color: var(--gold-bright); font-weight: 800; line-height: 1; padding-right: 10px; border-right: 1px solid rgba(217,164,65,.35); min-width: 60px; text-align: center; }
.cp-today-score small { font-size: 12px; color: var(--ink-dim); font-weight: 400; margin-left: 2px; }
.cp-today-tg { font-size: 12.5px; color: var(--ink-dim); }
.cp-today-meta { font-size: 13px; color: var(--ink); }
.cp-today-basis { font-size: 12.5px !important; color: var(--ink-dim) !important; font-style: italic; }
.cp-scores-inline { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 8px; margin: 10px 0; }
.cp-scores-inline span { border: 1px solid rgba(217,164,65,.35); border-radius: 999px; padding: 3px 12px; font-size: 13px; color: var(--gold-bright); background: rgba(0,0,0,.18); font-weight: 600; }
.cp-lucky-inline { text-align: center; font-size: 13.5px; color: var(--ink); }

/* 列印時性格/今日區塊亦切成淺色 */
body.print-compact .cp-section { background: #fdfaf3; border-color: #d4b26a; }
body.print-compact .cp-section-title, body.print-compact .cp-today-score, body.print-compact .cp-persona b, body.print-compact .cp-today b { color: #7a5a1c; }
body.print-compact .cp-persona p, body.print-compact .cp-today p, body.print-compact .cp-today-meta, body.print-compact .cp-lucky-inline { color: #333; }
body.print-compact .cp-scores-inline span { color: #7a5a1c; background: #fdfaf3; border-color: #d4b26a; }
body.print-compact .cp-today-basis, body.print-compact .cp-today-tg { color: #666 !important; }

/* ---------- 表單 ---------- */
.form-panel {
  border: 1px solid var(--gold-dim); border-radius: 6px; padding: 30px 26px;
  background: linear-gradient(180deg, var(--bg-card), var(--bg-card2));
  box-shadow: 0 12px 40px rgba(0,0,0,.45);
}
.progress { display: flex; justify-content: center; gap: 46px; margin-bottom: 26px; }
.progress-dot { position: relative; text-align: center; color: var(--ink-dim); font-size: 13px; }
.progress-dot::before {
  content: ''; display: block; width: 14px; height: 14px; margin: 0 auto 6px; border-radius: 50%;
  border: 2px solid var(--gold-dim); background: transparent; transition: all .25s;
}
.progress-dot.on { color: var(--gold-bright); }
.progress-dot.on::before { background: var(--gold); border-color: var(--gold-bright); box-shadow: 0 0 10px rgba(217,164,65,.6); }
.form-step { display: none; }
.form-step.active { display: block; animation: fadein .35s ease; }
.form-step h3 { color: var(--gold-bright); font-size: 20px; letter-spacing: .1em; margin-bottom: 4px; }
.form-step .step-sub { color: var(--ink-dim); font-size: 13.5px; margin-bottom: 18px; }
.field { margin-bottom: 18px; }
.field > label { display: block; color: var(--gold); font-size: 15px; margin-bottom: 8px; letter-spacing: .08em; }
input[type="text"], select {
  width: 100%; font-family: inherit; font-size: 17px; color: var(--ink);
  background: #1d0708; border: 1px solid var(--gold-dim); border-radius: 4px; padding: 11px 14px;
  outline: none; letter-spacing: .1em;
}
input[type="text"]:focus, select:focus { border-color: var(--gold-bright); box-shadow: 0 0 0 2px rgba(217,164,65,.2); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.row3 { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 10px; }
.radio-row { display: flex; flex-wrap: wrap; gap: 10px; }
.radio-row label {
  cursor: pointer; border: 1px solid var(--gold-dim); border-radius: 999px; padding: 8px 20px;
  color: var(--ink-dim); font-size: 15px; transition: all .15s; user-select: none;
}
.radio-row input { display: none; }
.radio-row label:has(input:checked) { background: rgba(217,164,65,.16); color: var(--gold-bright); border-color: var(--gold); }
.radio-row label:has(input:checked) span { color: var(--gold-bright); }
.focus-chip {
  cursor: pointer; border: 1px solid var(--gold-dim); border-radius: 999px; padding: 8px 20px;
  color: var(--ink-dim); font-size: 15px; user-select: none; transition: all .15s; display: inline-block;
}
.focus-chip.sel { background: rgba(217,164,65,.16); color: var(--gold-bright); border-color: var(--gold); }
.form-nav { display: flex; justify-content: space-between; margin-top: 26px; align-items: center; }
.form-note { color: #8d7350; font-size: 12.5px; margin-top: 14px; }

/* 筆畫確認 */
#stroke-editor { display: none; margin-top: 14px; border: 1px dashed var(--gold-dim); border-radius: 6px; padding: 14px; background: rgba(0,0,0,.18); }
#stroke-editor.open { display: block; }
.stroke-title { color: var(--gold); font-size: 14px; margin-bottom: 10px; }
.stroke-title span { color: var(--ink-dim); font-size: 12px; }
.stroke-row { display: flex; flex-wrap: wrap; gap: 12px; }
.stroke-cell { text-align: center; }
.stroke-ch { font-size: 26px; color: var(--gold-bright); margin-bottom: 4px; }
.stroke-in {
  width: 62px; text-align: center; font-family: inherit; font-size: 16px; color: var(--ink);
  background: #1d0708; border: 1px solid var(--gold-dim); border-radius: 4px; padding: 6px 4px;
}
.stroke-warn { color: var(--bad); font-size: 11px; margin-top: 3px; }
.stroke-hint { color: var(--ink-dim); font-size: 12.5px; margin-top: 8px; }

/* ---------- 載入 ---------- */
.loading-box { text-align: center; padding: 70px 0; }
.compass { position: relative; width: 150px; height: 150px; margin: 0 auto 30px; }
.compass .ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--gold-dim); border-top-color: var(--gold-bright);
  animation: spin 1.6s linear infinite;
}
.compass .ring2 {
  position: absolute; inset: 16px; border-radius: 50%;
  border: 1px dashed var(--gold-dim);
  animation: spin 14s linear infinite reverse;
}
.compass .ring2 i {
  position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px;
  font-style: normal; font-size: 13px; line-height: 18px; text-align: center; color: var(--gold);
}
.compass .ring2 i:nth-child(1) { transform: rotate(0deg) translateY(-42px); }
.compass .ring2 i:nth-child(2) { transform: rotate(45deg) translateY(-42px); }
.compass .ring2 i:nth-child(3) { transform: rotate(90deg) translateY(-42px); }
.compass .ring2 i:nth-child(4) { transform: rotate(135deg) translateY(-42px); }
.compass .ring2 i:nth-child(5) { transform: rotate(180deg) translateY(-42px); }
.compass .ring2 i:nth-child(6) { transform: rotate(225deg) translateY(-42px); }
.compass .ring2 i:nth-child(7) { transform: rotate(270deg) translateY(-42px); }
.compass .ring2 i:nth-child(8) { transform: rotate(315deg) translateY(-42px); }
.compass .taiji { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 44px; filter: drop-shadow(0 0 12px rgba(217,164,65,.5)); }
@keyframes spin { to { transform: rotate(360deg); } }
#load-line { color: var(--gold-bright); font-size: 17px; letter-spacing: .2em; }

/* ---------- 結果 ---------- */
.r-section {
  border: 1px solid var(--gold-dim); border-radius: 6px; margin-bottom: 22px;
  background: linear-gradient(180deg, var(--bg-card), var(--bg-card2));
  box-shadow: 0 10px 34px rgba(0,0,0,.4); overflow: hidden;
}
.r-section > h2 {
  font-size: 17px; color: var(--gold-bright); letter-spacing: .3em; text-indent: .3em;
  padding: 13px 20px; border-bottom: 1px solid rgba(217,164,65,.25);
  background: linear-gradient(90deg, rgba(217,164,65,.12), transparent);
}
.r-section .inner { padding: 20px; }
#r-head { text-align: center; padding: 26px 20px; }
.r-name { font-size: 30px; color: var(--gold-bright); font-weight: 800; letter-spacing: .15em; }
.r-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 10px; margin-top: 12px; }
.r-meta span {
  border: 1px solid var(--gold-dim); border-radius: 999px; font-size: 13.5px; color: var(--ink);
  padding: 4px 14px; background: rgba(217,164,65,.06);
}
.score-row { display: grid; grid-template-columns: 96px 1fr 108px; align-items: center; gap: 12px; margin-bottom: 13px; }
.score-row.focus .score-label { color: var(--gold-bright); }
.score-label { font-size: 16px; color: var(--ink); letter-spacing: .15em; }
.score-label em { display: block; font-style: normal; font-size: 11px; color: var(--red-seal); background: rgba(255, 230, 200, .9); border-radius: 3px; padding: 0 5px; width: fit-content; margin-top: 2px; }
.score-bar { height: 12px; border-radius: 999px; background: rgba(0,0,0,.4); border: 1px solid rgba(217,164,65,.25); overflow: hidden; }
.score-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #8a5a20, var(--gold) 60%, var(--gold-bright)); box-shadow: 0 0 10px rgba(217,164,65,.5); animation: grow 1s ease; }
@keyframes grow { from { width: 0; } }
.score-val { font-size: 17px; color: var(--gold-bright); text-align: right; }
.score-star { display: block; font-size: 11px; color: var(--gold); letter-spacing: 2px; }
#r-summary p { margin-bottom: 10px; }
#r-summary b { color: var(--gold-bright); }
.r-focus-tip { color: var(--ink-dim); font-size: 13.5px; }
.month-grid, #r-months { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.month-card { border: 1px solid rgba(217,164,65,.3); border-radius: 6px; background: rgba(0,0,0,.18); overflow: hidden; }
.month-head { padding: 8px 14px; color: var(--gold-bright); font-size: 15px; border-bottom: 1px dashed rgba(217,164,65,.3); }
.month-head span { color: var(--ink-dim); font-size: 12.5px; margin-left: 8px; letter-spacing: .1em; }
.month-body { padding: 10px 14px; font-size: 13.8px; color: var(--ink); }
.month-body p { margin-bottom: 5px; }
.lucky-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.lucky-grid > div { border: 1px solid rgba(217,164,65,.3); border-radius: 6px; padding: 10px 12px; font-size: 14.5px; background: rgba(0,0,0,.15); }
.lucky-grid label { display: block; color: var(--gold); font-size: 12px; margin-bottom: 3px; letter-spacing: .15em; }
.lucky-tips p { font-size: 14.5px; margin-bottom: 6px; }

/* 系統卡片 */
.sys-card { border: 1px solid var(--gold-dim); border-radius: 6px; margin-bottom: 20px; background: linear-gradient(180deg, var(--bg-card), var(--bg-card2)); box-shadow: 0 8px 28px rgba(0,0,0,.35); overflow: hidden; }
.sys-head { display: flex; gap: 14px; align-items: center; padding: 15px 20px; border-bottom: 1px solid rgba(217,164,65,.22); background: linear-gradient(90deg, rgba(217,164,65,.1), transparent); }
.sys-icon { font-size: 30px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.5)); }
.sys-head h3 { font-size: 18px; color: var(--gold-bright); letter-spacing: .08em; }
.sys-tag { font-size: 12.5px; color: var(--ink-dim); margin-top: 2px; }
.sys-body { padding: 18px 20px; font-size: 15px; }
.sys-body p { margin-bottom: 10px; }
.c-trait { color: var(--gold-bright); }
.c-grid { display: grid; gap: 10px; }
.c-grid > div { border-left: 3px solid var(--gold-dim); padding: 2px 0 2px 12px; }
.c-grid label { display: block; color: var(--gold); font-size: 13px; letter-spacing: .2em; margin-bottom: 2px; }
.c-note { color: #8d7350; font-size: 12.5px; }

/* 姓名學表格 */
.grid-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 14px; }
.grid-table th { color: var(--gold); border-bottom: 1px solid var(--gold-dim); padding: 7px 8px; text-align: left; font-weight: 600; letter-spacing: .1em; }
.grid-table td { border-bottom: 1px dashed rgba(217,164,65,.2); padding: 9px 8px; vertical-align: top; }
.grid-table b { color: var(--gold-bright); }
.g-mean { display: block; font-size: 11.5px; color: var(--ink-dim); }
.g-num { font-size: 20px; color: var(--gold-bright); font-weight: 700; }
.luck-badge { display: inline-block; border-radius: 4px; font-size: 12.5px; padding: 1px 9px; letter-spacing: .1em; }
.luck-badge.good { background: rgba(63,166,107,.18); color: #7fd6a4; border: 1px solid rgba(63,166,107,.5); }
.luck-badge.mid { background: rgba(217,164,65,.15); color: var(--gold-bright); border: 1px solid rgba(217,164,65,.5); }
.luck-badge.bad { background: rgba(192,80,77,.18); color: #e89693; border: 1px solid rgba(192,80,77,.5); }
.sancai-box { border: 1px dashed var(--gold-dim); border-radius: 6px; padding: 12px 14px; margin-bottom: 10px; background: rgba(0,0,0,.15); }
.sancai-combo { color: var(--gold-bright); font-size: 16px; margin-bottom: 6px; display: flex; align-items: center; gap: 10px; }

/* 八字 */
.bazi-pillars { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.pillar { flex: 1; min-width: 84px; text-align: center; border: 1px solid rgba(217,164,65,.35); border-radius: 6px; padding: 10px 6px; background: rgba(0,0,0,.18); }
.pillar label { display: block; font-size: 12px; color: var(--gold); letter-spacing: .2em; margin-bottom: 4px; }
.pillar-gz { font-size: 26px; color: var(--gold-bright); font-weight: 700; letter-spacing: .1em; }
.pillar-elem { font-size: 12px; color: var(--ink-dim); margin-top: 3px; }
.elem-bars { margin-bottom: 14px; }
.elem-row { display: grid; grid-template-columns: 28px 1fr 24px; gap: 10px; align-items: center; margin-bottom: 7px; }
.elem-name { font-size: 15px; text-align: center; }
.elem-track { height: 10px; background: rgba(0,0,0,.35); border-radius: 999px; overflow: hidden; border: 1px solid rgba(217,164,65,.2); }
.elem-fill { height: 100%; border-radius: 999px; }
.elem-cnt { font-size: 13px; color: var(--ink-dim); text-align: right; }
.e-木 { color: #7fd6a4; } .elem-fill.e-木 { background: #3fa66b; }
.e-火 { color: #f0938c; } .elem-fill.e-火 { background: #c0504d; }
.e-土 { color: #e8c07a; } .elem-fill.e-土 { background: #a97b2e; }
.e-金 { color: #efe6d0; } .elem-fill.e-金 { background: #b9ac8f; }
.e-水 { color: #8fb8e8; } .elem-fill.e-水 { background: #4a76b3; }

/* 結果底部 */
.result-actions { display: flex; justify-content: center; gap: 14px; margin: 26px 0 22px; flex-wrap: wrap; }
.result-actions .btn-ghost { font-size: 17.5px; padding: 13px 30px; border-width: 1.5px; }
.foot { text-align: center; color: #7d6647; font-size: 12.5px; margin-top: 26px; }
.foot a { color: var(--gold-dim); }

/* 古籍引用、白話、十神藏干、大運、AI */
.cite { display: block; margin-top: 4px; color: #8d7350; font-size: 12px; letter-spacing: .03em; }
.plain { color: #e6d3a8; font-size: 14px; }
.pillar-tg { font-size: 12px; color: var(--red-seal); background: rgba(255,230,200,.85); border-radius: 3px; display: inline-block; padding: 0 6px; margin-bottom: 3px; }
.pillar-cang { font-size: 12px; color: var(--ink-dim); margin-top: 5px; line-height: 1.6; }
.pillar-cang small { color: #9b8258; font-size: 10.5px; margin-left: 1px; margin-right: 3px; }
.dayun-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 8px; }
.dayun { border: 1px solid rgba(217,164,65,.3); border-radius: 5px; padding: 4px 8px; text-align: center; min-width: 64px; }
.dayun b { display: block; color: var(--gold-bright); font-size: 15px; }
.dayun small { display: block; font-size: 11px; color: var(--ink-dim); }
.dayun.cur { border-color: var(--gold-bright); background: rgba(217,164,65,.16); box-shadow: 0 0 10px rgba(217,164,65,.35); }
.ai-box { border-color: var(--gold); }
.ai-out h4.ai-h { color: var(--gold-bright); font-size: 17px; letter-spacing: .12em; margin: 16px 0 6px; border-left: 3px solid var(--gold); padding-left: 10px; }
.ai-out p { font-size: 15px; margin-bottom: 8px; }
.biblio p { font-size: 14px; margin-bottom: 8px; color: var(--ink); }
.biblio b { color: var(--gold); }

/* About Life 副標、隱私、回訪、今日運勢 */
.site-en { font-family: "Cormorant Garamond", "Times New Roman", serif; font-style: italic; color: var(--gold); font-size: 22px; letter-spacing: .32em; margin-top: 2px; text-shadow: 0 0 14px rgba(217,164,65,.3); }
.privacy-line { margin-top: 10px; color: #b89a66; font-size: 13px; letter-spacing: .05em; }
#privacy-modal { display: none; position: fixed; inset: 0; z-index: 95; background: rgba(10,2,2,.82); backdrop-filter: blur(3px); padding: 60px 14px; overflow-y: auto; }
#privacy-modal.open { display: block; }
#welcome-back { max-width: 560px; margin: 18px auto 4px; border: 1px solid var(--gold); border-radius: 8px; padding: 16px; background: rgba(217,164,65,.07); }
.wb-title { color: var(--gold-bright); font-size: 17px; letter-spacing: .1em; margin-bottom: 10px; }
.wb-list { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.wb-item { cursor: pointer; border: 1px solid var(--gold-dim); border-radius: 999px; padding: 7px 16px; color: var(--ink); font-size: 14.5px; background: transparent; font-family: inherit; }
.wb-item:hover { background: rgba(217,164,65,.16); color: var(--gold-bright); }
.wb-item small { color: var(--ink-dim); margin-left: 4px; }
.wb-warn { margin-top: 10px; color: #e0a08c; font-size: 12.5px; }
.wb-clear { margin-top: 10px; background: none; border: none; color: #8d7350; font-size: 12px; cursor: pointer; text-decoration: underline; font-family: inherit; }
.daily-box { border-color: var(--gold); }
.daily-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.daily-score { font-size: 46px; font-weight: 900; color: var(--gold-bright); line-height: 1; }
.daily-score small { font-size: 14px; color: var(--ink-dim); font-weight: 400; margin-left: 4px; }
.daily-come { color: #b89a66; font-size: 13px; margin-top: 8px; }

/* 線上人數綠點 */
.online-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #4ade80; margin-right: 5px; box-shadow: 0 0 8px rgba(74,222,128,.8); animation: pulse 2s ease infinite; vertical-align: 1px; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }

/* 月運依據 */
.month-basis { color: #9b8258; font-size: 12.5px; border-bottom: 1px dashed rgba(217,164,65,.2); padding-bottom: 6px; margin-bottom: 7px; }

/* 宣傳區 */
.promo-box { border-color: var(--gold); background: linear-gradient(160deg, #3a1210, #2b0d0e); text-align: center; }
.promo-box .inner { padding: 30px 20px; }
.promo-title { font-size: 22px; color: var(--gold-bright); font-weight: 800; letter-spacing: .08em; margin-bottom: 10px; }
.promo-body { font-size: 16px; margin-bottom: 6px; }
.promo-body b { color: var(--gold-bright); }
.promo-cta { color: var(--ink-dim); font-size: 14px; margin-bottom: 18px; }
.promo-btn { font-size: 17px; padding: 12px 36px; letter-spacing: .12em; text-decoration: none; display: inline-block; margin-top: 0; }

/* Toast */
#toast {
  position: fixed; left: 50%; bottom: 36px; transform: translateX(-50%) translateY(20px);
  background: #3a0f10; color: var(--gold-bright); border: 1px solid var(--gold);
  border-radius: 999px; padding: 10px 26px; font-size: 15px; opacity: 0; pointer-events: none;
  transition: all .3s ease; z-index: 99; box-shadow: 0 10px 30px rgba(0,0,0,.5);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 560px) {
  .site-title { font-size: 32px; }
  .seal { width: 42px; height: 42px; font-size: 16px; }
  .row3 { grid-template-columns: 1fr; }
  .score-row { grid-template-columns: 76px 1fr 92px; }
}

/* ---------- 列印 ---------- */
@media print {
  body { background: #fff; color: #222; }
  body::before, .gold-dust, .site-head .head-divider, #visit-counter, .result-actions, .foot, #toast, .explain { display: none !important; }
  .r-section, .sys-card { box-shadow: none; background: #fff; border-color: #bba; break-inside: avoid; }
  .r-section > h2, .sys-head { background: #f7f2e4; color: #7a5a1c; }
  .sys-head h3, .r-name, .score-val, .c-trait, #r-summary b, .pillar-gz, .g-num, .sancai-combo, .month-head { color: #7a5a1c; }
  .score-label, .r-meta span, .sys-body, .month-body, #r-summary p, #r-persona { color: #333; }
  .site-title { color: #7a5a1c; text-shadow: none; }
  .byline { display: block !important; color: #7a5a1c; }
  .byline a { color: #7a5a1c; }
  #compact-modal { display: none !important; }

  /* 精簡版列印：只印精簡卡 */
  body.print-compact .wrap { display: none !important; }
  body.print-compact #compact-modal { display: block !important; position: static; background: none; backdrop-filter: none; padding: 0; }
  body.print-compact .compact-card { box-shadow: none; background: #fff; border-color: #bba; max-width: none; }
  body.print-compact .cp-title, body.print-compact .cp-name, body.print-compact .cp-scores b, body.print-compact .cp-line b { color: #7a5a1c; }
  body.print-compact .cp-line, body.print-compact .cp-chips span { color: #333; }
  body.print-compact .cp-scores label, body.print-compact .cp-name span, body.print-compact .cp-foot { color: #666; }
  body.print-compact .compact-actions { display: none !important; }
}

/* =====================================================================
   2026 大翻新．新中式奢華（墨黑・朱砂・流光金）— 僅作用於螢幕，不影響列印
   ===================================================================== */
@media screen {
  :root {
    --bg-deep: #080706; --bg-main: #0e0c0b; --bg-card: #151210; --bg-card2: #110f0d;
    --gold: #c9a45c; --gold-bright: #efd394; --gold-dim: #5c4a2b;
    --red-seal: #b3281b; --cinnabar: #c8361f;
    --ink: #eee5d3; --ink-dim: #a3947a;
    --hair: rgba(201,164,92,.22);
  }
  body {
    background:
      radial-gradient(900px 520px at 50% -140px, rgba(200,54,31,.20), transparent 70%),
      radial-gradient(700px 700px at 110% 30%, rgba(201,164,92,.06), transparent 60%),
      radial-gradient(600px 600px at -10% 80%, rgba(200,54,31,.06), transparent 60%),
      linear-gradient(180deg, #0e0c0b 0%, #080706 100%);
    background-attachment: fixed;
    line-height: 1.85;
  }
  /* 水墨遠山取代雲紋 */
  body::before {
    opacity: .09;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='400' viewBox='0 0 1200 400'%3E%3Cpath d='M0 330 C120 250 200 290 300 230 C380 185 450 250 540 205 C640 150 720 240 820 190 C930 135 1030 230 1200 170 L1200 400 L0 400Z' fill='%23c9a45c' opacity='.5'/%3E%3Cpath d='M0 370 C160 310 260 350 400 300 C520 260 640 330 780 290 C900 255 1050 320 1200 280 L1200 400 L0 400Z' fill='%23c9a45c'/%3E%3C/svg%3E");
    background-repeat: repeat-x; background-position: bottom center; background-size: 1200px 400px;
  }
  .gold-dust i { background: radial-gradient(circle at 35% 35%, #fff1c4, var(--gold) 55%, transparent); opacity: .45; }
  .wrap { max-width: 900px; padding: 44px 20px 80px; }

  /* 標題：流光金字 */
  .site-head { padding: 26px 0 14px; }
  .site-title { font-size: 52px; letter-spacing: .22em; text-shadow: none; gap: 18px; }
  .site-title { background: linear-gradient(100deg, #9c7a3c 0%, #efd394 22%, #fff4d2 30%, #c9a45c 45%, #efd394 70%, #9c7a3c 100%);
    background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: goldflow 7s linear infinite; }
  .site-title .seal { -webkit-text-fill-color: #fbe9cf; color: #fbe9cf; background: linear-gradient(160deg, #d2432b, #9e2114); border-radius: 6px; width: 58px; height: 58px; font-size: 21px; box-shadow: inset 0 0 0 2px rgba(251,233,207,.75), 0 6px 22px rgba(200,54,31,.45); transform: rotate(-4deg); }
  @keyframes goldflow { from { background-position: 220% 0; } to { background-position: 0 0; } }
  .site-en { font-size: 24px; color: var(--gold); letter-spacing: .38em; margin-top: 4px; }
  .site-sub { color: var(--ink-dim); letter-spacing: .7em; font-size: 13px; }
  .byline { color: #d8c393; }
  .head-divider::before { background: linear-gradient(90deg, transparent, var(--gold) 30%, var(--cinnabar) 50%, var(--gold) 70%, transparent); }

  /* 首頁框 */
  .hero-frame { border: 1px solid var(--hair); background: linear-gradient(180deg, rgba(201,164,92,.05), rgba(0,0,0,0) 45%); padding: 52px 30px 40px; border-radius: 2px; }
  .hero h2 { font-size: 30px; font-weight: 900; letter-spacing: .18em; }
  .sys-icons span { border-color: var(--hair); background: rgba(255,255,255,.02); color: var(--ink); font-size: 13.5px; padding: 6px 15px; }

  /* 按鈕 */
  .btn-gold { background: linear-gradient(180deg, #f6dfa6, #c9a45c 60%, #9c7a3c); color: #1b1206; border-radius: 2px; letter-spacing: .3em; box-shadow: 0 8px 30px rgba(201,164,92,.25), inset 0 1px 0 #fff4d2; }
  .btn-gold:hover { box-shadow: 0 12px 36px rgba(201,164,92,.38), inset 0 1px 0 #fff4d2; }
  .btn-ghost { border-color: var(--hair); color: var(--gold-bright); border-radius: 2px; }
  .btn-ghost:hover { background: rgba(201,164,92,.08); border-color: var(--gold); }
  .result-actions .btn-ghost { border-radius: 2px; }

  /* 區塊與卡片：細金線、朱砂小方印、大留白 */
  .form-panel, .r-section, .sys-card { background: linear-gradient(180deg, var(--bg-card), var(--bg-card2)); border: 1px solid var(--hair); border-radius: 2px; box-shadow: 0 18px 50px rgba(0,0,0,.55); position: relative; }
  .r-section::before, .sys-card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .7; }
  .r-section, .sys-card { margin-bottom: 30px; }
  .r-section > h2 { text-align: center; background: none; border-bottom: none; padding: 26px 20px 4px; font-size: 19px; letter-spacing: .38em; text-indent: .38em; color: var(--gold-bright); }
  .r-section > h2::after { content: ''; display: block; width: 64px; height: 1px; margin: 14px auto 0; background: linear-gradient(90deg, transparent, var(--cinnabar), transparent); }
  .r-section .inner { padding: 20px 30px 30px; }
  .sys-head { background: none; border-bottom: 1px solid rgba(201,164,92,.12); padding: 20px 26px; }
  .sys-head h3 { font-size: 19.5px; letter-spacing: .1em; }
  .sys-icon { width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; font-size: 24px; border: 1px solid var(--hair); border-radius: 50%; background: radial-gradient(circle, rgba(200,54,31,.18), transparent 70%); }
  .sys-body { padding: 22px 26px 26px; font-size: 15.5px; }
  .c-grid > div { border-left: 2px solid var(--cinnabar); padding: 4px 0 4px 14px; }
  .c-grid label { color: var(--gold); letter-spacing: .16em; }
  .c-trait { color: var(--gold-bright); font-size: 16px; }
  #r-head { padding: 40px 20px 34px; }
  .r-name { font-size: 38px; font-weight: 900; letter-spacing: .2em; }
  .r-meta span { border-color: var(--hair); border-radius: 2px; background: rgba(255,255,255,.02); }
  .score-bar { height: 8px; background: rgba(255,255,255,.05); border-color: transparent; }
  .score-fill { background: linear-gradient(90deg, #7a2a1a, var(--cinnabar) 35%, var(--gold) 75%, var(--gold-bright)); box-shadow: 0 0 12px rgba(201,164,92,.4); }
  .pillar, .month-card, .lucky-grid > div, .dayun, .sancai-box { border-color: var(--hair); border-radius: 2px; background: rgba(255,255,255,.02); }
  .pillar-gz { font-size: 30px; }
  input[type="text"], select, .stroke-in { background: #0c0a09; border-color: var(--hair); border-radius: 2px; }
  .radio-row label, .focus-chip { border-color: var(--hair); border-radius: 2px; }
  .progress-dot.on::before { background: var(--cinnabar); border-color: var(--gold); box-shadow: 0 0 10px rgba(200,54,31,.6); }
  .promo-box { background: linear-gradient(160deg, #1c1310, #120e0c); border-color: var(--gold-dim); }
  .compact-card { background: linear-gradient(180deg, #171311, #0f0c0b); border-color: var(--gold-dim); border-radius: 2px; }
  #welcome-back { border-color: var(--hair); border-radius: 2px; background: rgba(201,164,92,.04); }
  .wb-item { border-radius: 2px; border-color: var(--hair); }
  .daily-box .inner { background: radial-gradient(500px 160px at 50% 0, rgba(200,54,31,.12), transparent 70%); }
  .daily-score { background: linear-gradient(180deg, #fff1c4, #c9a45c); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 56px; }

  /* 運勢曲線 */
  .mc-svg { width: 100%; height: auto; display: block; overflow: visible; }
  .mc-grid { stroke: rgba(201,164,92,.12); stroke-dasharray: 3 5; }
  .mc-axis { fill: #6f6350; font-size: 11px; }
  .mc-line { fill: none; stroke: var(--gold-bright); stroke-width: 2.4; }
  .mc-pt { cursor: pointer; outline: none; }
  .mc-dot { stroke: #0e0c0b; stroke-width: 2; transition: r .2s; }
  .mc-dot.glow { filter: drop-shadow(0 0 6px rgba(239,211,148,.9)); }
  .mc-pt.sel .mc-dot { stroke: #fff4d2; stroke-width: 2.5; }
  .mc-val { fill: var(--gold-bright); font-size: 13px; font-weight: 700; }
  .mc-mon { fill: var(--ink); font-size: 14px; letter-spacing: .05em; }
  .mc-lab { font-size: 12px; } .lab-good { fill: #7fd6a4; } .lab-mid { fill: #a3947a; } .lab-bad { fill: #e37b66; }
  .mc-pt.sel .mc-mon { fill: var(--gold-bright); font-weight: 700; }
  .mc-hint { text-align: center; color: #7d705b; font-size: 12.5px; margin: 4px 0 12px; }
  .mc-detail { border: 1px solid var(--hair); border-left: 2px solid var(--cinnabar); padding: 14px 18px; background: rgba(255,255,255,.02); }
  .mc-dh { color: var(--gold-bright); font-size: 16px; margin-bottom: 8px; letter-spacing: .06em; }


  /* 檢查修正 */
  #r-months { display: block; }
  .lucky-grid { grid-template-columns: repeat(3, 1fr); }
  .site-title .seal { font-size: 32px; line-height: 1; }
  @media (max-width: 560px) {
    .site-title { font-size: 34px; letter-spacing: .14em; gap: 12px; }
    .site-title .seal { width: 44px; height: 44px; font-size: 16px; }
    .r-section .inner, .sys-body { padding-left: 18px; padding-right: 18px; }
    .r-name { font-size: 30px; }
    .lucky-grid { grid-template-columns: repeat(2, 1fr); }
    .site-title .seal { font-size: 24px; }
  }
}

/* =====================================================================
   首頁重設計 v2：對齊網格、單字篆印圖示、數據列
   ===================================================================== */
@media screen {
  #screen-intro { max-width: 820px; margin: 0 auto; }
  .home-hero { text-align: center; padding: 34px 0 10px; }
  .home-eyebrow { display: inline-flex; align-items: center; gap: 14px; color: var(--gold); font-size: 13px; letter-spacing: .35em; text-indent: .35em; }
  .home-eyebrow span { width: 44px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
  .home-eyebrow span:last-child { background: linear-gradient(90deg, var(--gold), transparent); }
  .home-h1 { margin: 22px 0 18px; font-size: 46px; line-height: 1.45; font-weight: 900; letter-spacing: .16em; text-indent: .16em; color: var(--ink);
    background: linear-gradient(180deg, #fff7e2, #e7c887 70%, #b8914a); -webkit-background-clip: text; background-clip: text; color: transparent; }
  .home-lead { color: var(--ink-dim); font-size: 15.5px; line-height: 2; max-width: 600px; margin: 0 auto; }
  .home-cta { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
  .home-cta .btn-gold, .home-cta .btn-ghost { margin: 0; min-width: 200px; height: 56px; padding: 0 28px; font-size: 18px; letter-spacing: .3em; text-indent: .3em; display: inline-flex; align-items: center; justify-content: center; }
  .home-cta .btn-ghost { font-size: 16px; letter-spacing: .2em; text-indent: .2em; }
  .privacy-line { margin-top: 16px; font-size: 12.5px; color: #8f8068; letter-spacing: .12em; }
  .home-stats { display: grid; grid-template-columns: 1fr 1fr; max-width: 420px; margin: 34px auto 0; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
  .home-stats .stat { padding: 16px 0 14px; text-align: center; }
  .home-stats .stat + .stat { border-left: 1px solid var(--hair); }
  .home-stats .stat b { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 28px; font-weight: 700; color: var(--gold-bright); font-variant-numeric: tabular-nums; letter-spacing: .04em; }
  .home-stats .stat span { display: block; margin-top: 4px; font-size: 12px; color: var(--ink-dim); letter-spacing: .3em; text-indent: .3em; }
  .home-stats .online-dot { margin: 0; }

  .home-section { margin-top: 64px; }
  .home-sec-title { display: flex; align-items: center; gap: 18px; margin-bottom: 26px; color: var(--gold-bright); font-size: 16px; letter-spacing: .4em; }
  .home-sec-title::before, .home-sec-title::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--hair)); }
  .home-sec-title::after { background: linear-gradient(90deg, var(--hair), transparent); }
  .home-sec-title span { white-space: nowrap; text-indent: .4em; }

  .sys-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--hair); border-left: 1px solid var(--hair); }
  .sys-tile { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 26px 10px 22px; border-right: 1px solid var(--hair); border-bottom: 1px solid var(--hair); transition: background .25s; }
  .sys-tile:hover { background: rgba(201,164,92,.05); }
  .sys-glyph { width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 900; color: var(--gold-bright);
    border: 1px solid rgba(201,164,92,.45); border-radius: 50%; background: radial-gradient(circle at 50% 40%, rgba(200,54,31,.22), transparent 70%); box-shadow: inset 0 0 0 4px rgba(14,12,11,1), inset 0 0 0 5px rgba(201,164,92,.18); }
  .sys-tile:last-child .sys-glyph { color: #fbe9cf; background: linear-gradient(160deg, #d2432b, #9e2114); border-color: transparent; }
  .sys-name { margin-top: 14px; font-size: 16px; color: var(--ink); letter-spacing: .12em; font-weight: 600; }
  .sys-desc { margin-top: 4px; font-size: 12px; color: var(--ink-dim); letter-spacing: .04em; }

  .home-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
  .home-steps .step { text-align: center; padding: 6px 12px; position: relative; }
  .home-steps .step + .step::before { content: ''; position: absolute; left: 0; top: 26px; width: 1px; height: 60px; background: var(--hair); }
  .home-steps i { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; font-style: normal; font-size: 16px; color: #fbe9cf; background: linear-gradient(160deg, #d2432b, #9e2114); border-radius: 3px; transform: rotate(-3deg); }
  .home-steps b { display: block; margin-top: 12px; font-size: 17px; color: var(--gold-bright); letter-spacing: .2em; text-indent: .2em; }
  .home-steps span { display: block; margin-top: 4px; font-size: 13px; color: var(--ink-dim); }

  .home-foot { text-align: center; }
  .home-foot .explain { max-width: none; margin: 0; }
  .home-foot .disclaim { margin-top: 18px; }
  .intro-return { margin-top: 22px; }
  .intro-return .btn-ghost { text-decoration: none; display: inline-block; font-size: 14px; }
  #welcome-back { margin: 30px auto 0; max-width: 560px; }
  .wb-title { font-size: 15px; letter-spacing: .2em; }

  @media (max-width: 760px) { .sys-grid { grid-template-columns: repeat(3, 1fr); } }
  @media (max-width: 560px) {
    .home-h1 { font-size: 32px; letter-spacing: .1em; text-indent: .1em; }
    .br-desk { display: none; }
    .home-lead { font-size: 14.5px; padding: 0 6px; }
    .home-cta { flex-direction: column; gap: 12px; }
    .home-cta .btn-gold, .home-cta .btn-ghost { width: 100%; max-width: 320px; }
    .sys-grid { grid-template-columns: repeat(2, 1fr); }
    .sys-tile { padding: 20px 8px 18px; }
    .home-steps { grid-template-columns: 1fr; gap: 22px; }
    .home-steps .step + .step::before { display: none; }
    .home-section { margin-top: 48px; }
  }
}
@media screen { .home-systems { margin-top: 44px; } .home-systems + .home-cta { margin-top: 40px; } }
/* 十二門命理：精簡高度（桌機 6×2、平板 4×3、手機 3×4） */
@media screen {
  .home-systems { margin-top: 36px; }
  .home-systems .home-sec-title { margin-bottom: 18px; font-size: 14px; }
  .sys-grid { grid-template-columns: repeat(6, 1fr); }
  .sys-tile { padding: 16px 6px 14px; }
  .sys-glyph { width: 40px; height: 40px; font-size: 18px; box-shadow: inset 0 0 0 3px rgba(14,12,11,1), inset 0 0 0 4px rgba(201,164,92,.18); }
  .sys-name { margin-top: 9px; font-size: 14px; letter-spacing: .08em; }
  .sys-desc { margin-top: 2px; font-size: 11px; line-height: 1.5; }
  .home-systems + .home-cta { margin-top: 32px; }
}
@media screen and (max-width: 760px) { .sys-grid { grid-template-columns: repeat(4, 1fr); } }
@media screen and (max-width: 560px) {
  .sys-grid { grid-template-columns: repeat(3, 1fr); }
  .sys-tile { padding: 12px 4px 10px; }
  .sys-glyph { width: 34px; height: 34px; font-size: 16px; }
  .sys-name { font-size: 13px; margin-top: 7px; }
  .sys-desc { display: none; }
}
/* 姓名逐字五行 */
.name-chars { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 16px; }
.name-chars .nc { min-width: 84px; text-align: center; border: 1px solid var(--hair, rgba(201,164,92,.22)); padding: 10px 8px; background: rgba(255,255,255,.02); }
.name-chars .nc b { display: block; font-size: 30px; color: var(--gold-bright); line-height: 1.2; }
.name-chars .nc span { display: block; font-size: 12px; color: var(--ink-dim); margin-top: 4px; }
.name-chars .nc em { display: inline-block; font-style: normal; font-weight: 700; font-size: 15px; margin-top: 4px; }
.name-chars .nc small { display: block; font-size: 10.5px; color: #7d705b; }

/* 今日運勢：依據明細 */
.daily-why { margin: 10px 0 12px; border: 1px solid rgba(217,164,65,.25); border-radius: 10px; padding: 10px 12px; background: rgba(0,0,0,.18); }
.dw-title { color: var(--gold-bright, #e8c877); font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.dw-row { display: grid; grid-template-columns: 58px 1fr 44px; gap: 8px; align-items: start; padding: 6px 0; border-bottom: 1px dashed rgba(217,164,65,.15); font-size: 13.5px; line-height: 1.55; }
.dw-row:last-of-type { border-bottom: 0; }
.dw-k { color: #1a120c; background: #c9a45c; border-radius: 4px; text-align: center; font-size: 12px; padding: 1px 0; white-space: nowrap; }
.dw-t b { color: #f2e2c0; }
.dw-d { text-align: right; font-weight: 700; color: #b89a66; font-variant-numeric: tabular-nums; }
.dw-d.up { color: #7fc48b; } .dw-d.down { color: #e0694f; }
.dw-sum { text-align: right; font-weight: 800; color: var(--gold-bright, #e8c877); padding-top: 6px; border-top: 1px solid rgba(217,164,65,.3); margin-top: 4px; }
.dw-note { font-size: 11.5px; color: #8c7550; margin-top: 6px; }

/* 開運處方：每項附依據 */
.lucky-list { display: grid; gap: 8px; }
.lk-row { display: grid; grid-template-columns: 86px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px dashed rgba(217,164,65,.18); }
.lk-k { color: #1a120c; background: #c9a45c; border-radius: 4px; text-align: center; font-size: 13px; padding: 2px 0; height: fit-content; }
.lk-v { font-weight: 700; color: #f2e2c0; }
.lk-why { display: block; font-weight: 400; font-size: 12.5px; color: #a58a5c; margin-top: 3px; line-height: 1.55; }
.lucky-tips p { margin: 8px 0; }

/* =====================================================================
   v3 · 獎項級打磨：品牌章、星盤 Hero、儀式化載入、章節導覽、動態
   ===================================================================== */
@media screen {
  /* 品牌「旺」印 */
  .site-title .seal.seal-wang {
    font-family: 'Noto Serif TC', serif; font-weight: 900; -webkit-text-fill-color: #fbe9cf; color: #fbe9cf;
    background: linear-gradient(180deg, #d6482f, #9a2113); border-radius: 7px;
    box-shadow: inset 0 0 0 2px #9a2113, inset 0 0 0 3.5px rgba(251,233,207,.9), inset 0 0 0 6px transparent, 0 8px 26px rgba(200,54,31,.45);
    display: inline-flex; align-items: center; justify-content: center; line-height: 1; transform: rotate(-4deg);
  }
  .site-head { transition: padding .5s cubic-bezier(.2,.7,.2,1); }
  .site-en, .byline, .head-divider { transition: opacity .4s, max-height .5s, margin .5s; max-height: 80px; overflow: hidden; }

  /* 內頁精簡頁首 */
  body[data-screen="form"] .site-head, body[data-screen="loading"] .site-head, body[data-screen="result"] .site-head { padding: 10px 0 2px; }
  body[data-screen="form"] .site-title, body[data-screen="loading"] .site-title, body[data-screen="result"] .site-title { font-size: 24px !important; gap: 10px; }
  body[data-screen="form"] .site-title .seal, body[data-screen="loading"] .site-title .seal, body[data-screen="result"] .site-title .seal { width: 34px !important; height: 34px !important; font-size: 19px !important; }
  body[data-screen="form"] .site-en, body[data-screen="loading"] .site-en, body[data-screen="result"] .site-en,
  body[data-screen="form"] .byline, body[data-screen="loading"] .byline, body[data-screen="result"] .byline { opacity: 0; max-height: 0; margin: 0 !important; }
  body[data-screen="form"] .head-divider, body[data-screen="loading"] .head-divider, body[data-screen="result"] .head-divider { margin: 8px auto 14px; }

  /* ---------- Hero 星盤 ---------- */
  .hero-astro { position: relative; width: min(78vw, 360px); aspect-ratio: 1; margin: 4px auto 8px; color: var(--gold); }
  .hero-astro::before { content: ''; position: absolute; inset: 12%; border-radius: 50%; background: radial-gradient(circle, rgba(200,54,31,.22), rgba(200,54,31,0) 68%); filter: blur(6px); }
  .astro { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
  .astro .ax-ticks { transform-origin: 0 0; animation: axSpin 140s linear infinite; }
  .astro .ax-band { transform-origin: 0 0; animation: axSpin 220s linear infinite reverse; }
  .astro .ax-star { transform-origin: 0 0; animation: axSpin 90s linear infinite; }
  .astro .ax-br { fill: #efe2c6; font: 600 17px 'Noto Serif TC', serif; opacity: 0; animation: axBr .6s cubic-bezier(.2,.7,.2,1) forwards; animation-delay: calc(.35s + var(--i) * 70ms); }
  .astro .ax-rings circle { stroke-dasharray: 1200; stroke-dashoffset: 1200; animation: axDraw 1.8s cubic-bezier(.6,.05,.2,1) forwards; }
  .astro .ax-rings circle:nth-child(2) { animation-delay: .1s } .astro .ax-rings circle:nth-child(3) { animation-delay: .2s }
  .astro .ax-rings circle:nth-child(4) { animation-delay: .3s } .astro .ax-rings circle:nth-child(5) { animation-delay: .4s }
  @keyframes axSpin { to { transform: rotate(360deg); } }
  @keyframes axDraw { to { stroke-dashoffset: 0; } }
  @keyframes axBr { from { opacity: 0; transform: translateY(4px); } to { opacity: .9; transform: none; } }

  .hero-seal { position: absolute; left: 50%; top: 50%; width: 30%; aspect-ratio: 1; transform: translate(-50%, -50%) rotate(-4deg);
    border-radius: 10%; background: linear-gradient(180deg, #d9492f, #97200f);
    box-shadow: inset 0 0 0 calc(var(--sw, 1) * 5px) #97200f, inset 0 0 0 calc(var(--sw, 1) * 7.5px) rgba(251,233,207,.92), 0 18px 50px rgba(200,54,31,.55), 0 0 0 1px rgba(0,0,0,.3);
    display: grid; place-items: center; animation: sealIn .7s cubic-bezier(.2,.9,.25,1.2) 1.35s both; }
  .hero-seal span { font: 900 clamp(40px, 12vw, 62px)/1 'Noto Serif TC', serif; color: #fbe9cf; text-shadow: 0 1px 0 rgba(0,0,0,.25); }
  .hero-seal.small span { font-size: 40px; }
  @keyframes sealIn { 0% { opacity: 0; transform: translate(-50%, -50%) rotate(-4deg) scale(2.4); } 70% { opacity: 1; transform: translate(-50%, -50%) rotate(-4deg) scale(.94); } 100% { opacity: 1; transform: translate(-50%, -50%) rotate(-4deg) scale(1); } }
  .hero-ripple { position: absolute; left: 50%; top: 50%; width: 30%; aspect-ratio: 1; border-radius: 50%; border: 2px solid rgba(214,72,47,.8); transform: translate(-50%, -50%) scale(.6); opacity: 0; animation: ripple 1.4s cubic-bezier(.2,.7,.2,1) 1.55s both; pointer-events: none; }
  @keyframes ripple { 0% { opacity: .9; transform: translate(-50%, -50%) scale(.7); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(3.4); } }

  /* Hero 文案進場編排 */
  .home-eyebrow { white-space: nowrap; }
  .home-hero > .home-eyebrow, .home-hero > .home-h1, .home-hero > .home-lead { animation: fadeUp .9s cubic-bezier(.2,.7,.2,1) both; }
  .home-hero > .home-eyebrow { animation-delay: 1.6s } .home-hero > .home-h1 { animation-delay: 1.75s } .home-hero > .home-lead { animation-delay: 1.95s }
  @keyframes fadeUp { from { opacity: 0; transform: translateY(18px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }

  /* ---------- 捲動顯現 ---------- */
  .fx-ready [data-rv] { opacity: 0; transform: translateY(22px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0ms); }
  .fx-ready [data-rv].in { opacity: 1; transform: none; }

  /* 十二門磚：光暈跟隨 */
  .sys-tile { position: relative; overflow: hidden; }
  .sys-tile::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .35s;
    background: radial-gradient(160px circle at var(--mx, 50%) var(--my, 50%), rgba(239,211,148,.16), transparent 60%); }
  .sys-tile:hover::after { opacity: 1; }
  .sys-tile:hover .sys-glyph { transform: translateY(-2px) scale(1.06); }
  .sys-glyph { transition: transform .35s cubic-bezier(.2,.7,.2,1); }

  /* 按鈕：流光＋墨暈 */
  .btn-gold, .btn-ghost { position: relative; overflow: hidden; isolation: isolate; }
  .btn-gold::before { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; z-index: -1;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent); transform: skewX(-18deg); animation: sheen 4.5s ease-in-out 3s infinite; }
  @keyframes sheen { 0%, 70% { left: -60%; } 100% { left: 130%; } }
  .btn-ink { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: rgba(255,255,255,.45); pointer-events: none; animation: ink .7s ease-out forwards; }
  .btn-ghost .btn-ink { background: rgba(239,211,148,.35); }
  @keyframes ink { to { transform: scale(40); opacity: 0; } }
  :focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; border-radius: 4px; }

  /* ---------- 載入儀式 ---------- */
  .compass.compass-v3 { position: relative; width: min(72vw, 300px); height: auto; aspect-ratio: 1; margin: 10px auto 18px; color: var(--gold); border: 0; background: none; box-shadow: none; animation: none; }
  .compass.compass-v3 .astro .ax-ticks { animation-duration: 9s; } .compass.compass-v3 .astro .ax-band { animation-duration: 16s; } .compass.compass-v3 .astro .ax-star { animation-duration: 6s; }
  .compass.compass-v3 .hero-seal { animation: sealPulse 1.6s ease-in-out infinite; }
  @keyframes sealPulse { 0%, 100% { transform: translate(-50%, -50%) rotate(-4deg) scale(1); } 50% { transform: translate(-50%, -50%) rotate(-4deg) scale(1.05); box-shadow: inset 0 0 0 5px #97200f, inset 0 0 0 7.5px rgba(251,233,207,.92), 0 18px 70px rgba(200,54,31,.8); } }
  .load-steps { list-style: none; margin: 18px auto 0; padding: 0; width: max-content; text-align: left; }
  .load-steps li { display: flex; align-items: center; gap: 12px; color: rgba(238,229,211,.32); font-size: 15px; letter-spacing: .14em; padding: 5px 0; transition: color .4s; }
  .load-steps li i { width: 9px; height: 9px; transform: rotate(45deg); border: 1px solid currentColor; transition: all .4s; }
  .load-steps li.on { color: var(--gold-bright); } .load-steps li.on i { background: var(--gold-bright); box-shadow: 0 0 12px var(--gold-bright); animation: blink .8s ease-in-out infinite alternate; }
  .load-steps li.done { color: rgba(238,229,211,.7); } .load-steps li.done i { background: #c8361f; border-color: #c8361f; }
  @keyframes blink { to { opacity: .35; } }

  /* ---------- 結果頁章節導覽 ---------- */
  #r-nav { position: sticky; top: 0; z-index: 30; margin: 0 -14px 16px; padding: 8px 0; transition: background .3s, box-shadow .3s; }
  #r-nav.stuck { background: rgba(10,8,7,.82); -webkit-backdrop-filter: blur(12px) saturate(1.2); backdrop-filter: blur(12px) saturate(1.2); box-shadow: 0 1px 0 var(--hair), 0 10px 30px rgba(0,0,0,.35); }
  .rn-track { display: flex; gap: 8px; overflow-x: auto; padding: 2px 14px; scrollbar-width: none; scroll-snap-type: x proximity; }
  .rn-track::-webkit-scrollbar { display: none; }
  .rn-track a { flex: none; scroll-snap-align: center; padding: 6px 14px; border: 1px solid var(--hair); border-radius: 999px; color: var(--ink-dim); text-decoration: none; font-size: 14px; letter-spacing: .08em; transition: all .25s; white-space: nowrap; }
  .rn-track a.on { color: #1a120c; background: linear-gradient(180deg, #f3dc9f, #c9a45c); border-color: transparent; font-weight: 700; box-shadow: 0 4px 16px rgba(201,164,92,.35); }

  /* 今日運勢：標題與依據明細（行動版堆疊） */
  .daily-box h2 { line-height: 1.5; }
  .daily-box h2 #daily-date { display: block; font-size: .62em; letter-spacing: .22em; color: var(--ink-dim); margin-top: 2px; }
  @media (max-width: 560px) {
    .dw-row { grid-template-columns: auto 1fr auto; grid-template-areas: 'k . d' 't t t'; row-gap: 4px; }
    .dw-k { grid-area: k; padding: 1px 10px; } .dw-d { grid-area: d; } .dw-t { grid-area: t; }
    .lk-row { grid-template-columns: 1fr; gap: 4px; } .lk-k { width: fit-content; padding: 2px 12px; }
    .r-section .inner { padding-left: 16px !important; padding-right: 16px !important; }
  }
}
@media (prefers-reduced-motion: reduce) {
  .astro *, .hero-seal, .hero-ripple, .btn-gold::before, .home-hero > * { animation: none !important; }
  .astro .ax-br { opacity: .9; } .astro .ax-rings circle { stroke-dashoffset: 0; }
  .fx-ready [data-rv] { opacity: 1 !important; transform: none !important; }
}
@media print { [data-rv] { opacity: 1 !important; transform: none !important; } #r-nav, .hero-astro { display: none !important; } }
@media screen {
  /* 首頁：Hero 星盤就是品牌主視覺，頁首收斂 */
  body[data-screen="intro"] .site-title .seal { display: none !important; }
  body[data-screen="intro"] .site-head { padding: 14px 0 0; }
  body[data-screen="intro"] .site-title { font-size: 34px !important; letter-spacing: .14em; }
  body[data-screen="intro"] .site-en { margin-top: 2px !important; }
  body[data-screen="intro"] .byline { margin-top: 4px !important; font-size: 14px; }
  body[data-screen="intro"] .byline a { font-size: 15px; }
  body[data-screen="intro"] .head-divider { display: none; }
  .hero-astro { margin-top: 10px; }
}
@media screen {
  .dw-t { font-weight: 400; color: #d9ccb1; } .dw-t b { font-weight: 700; color: #f4e6c7; }
}
/* 桌機：Hero 左右構圖（星盤｜標語），其餘全寬 */
@media screen and (min-width: 980px) {
  body[data-screen="intro"] .wrap { max-width: 1080px; }
  .home-hero { display: grid; grid-template-columns: 440px 1fr; column-gap: 56px; align-items: center; text-align: left; }
  .home-hero > * { grid-column: 1 / -1; }
  .home-hero > .hero-astro { grid-column: 1; grid-row: 1 / span 3; width: 440px; margin: 0; }
  .home-hero > .home-eyebrow { grid-column: 2; grid-row: 1; align-self: end; justify-self: start; text-indent: 0; }
  .home-hero > .home-eyebrow span:first-child { display: none; }
  .home-hero > .home-h1 { grid-column: 2; grid-row: 2; font-size: 58px; text-indent: 0; margin: 14px 0; }
  .home-hero > .home-lead { grid-column: 2; grid-row: 3; align-self: start; margin: 0; max-width: 470px; }
  .home-hero > .home-lead .br-desk { display: none; }
  .home-hero > #welcome-back, .home-hero > .home-systems, .home-hero > .home-cta, .home-hero > .privacy-line, .home-hero > .home-stats { text-align: center; max-width: 860px; justify-self: center; width: 100%; }
}
@media screen and (min-width: 980px) {
  #screen-intro { max-width: 1040px; }
  .home-hero > .home-h1 { white-space: nowrap; }
  .home-foot { max-width: 820px; margin-left: auto; margin-right: auto; }
}
@media screen and (min-width: 980px) {
  body[data-screen="intro"] .site-head { display: flex; align-items: center; gap: 18px; text-align: left; max-width: 1040px; margin: 0 auto 10px; padding: 6px 0 16px; border-bottom: 1px solid rgba(201,164,92,.18); }
  body[data-screen="intro"] .site-title { font-size: 26px !important; margin: 0 !important; }
  body[data-screen="intro"] .site-en { margin: 0 !important; font-size: 18px; }
  body[data-screen="intro"] .byline { margin: 0 0 0 auto !important; }
  .home-hero { padding-top: 40px; }
  .home-hero > .home-lead { font-size: 16.5px; }
  .home-hero > .hero-cta { display: inline-flex; grid-column: 2; grid-row: 4; justify-self: start; align-self: start; margin-top: 22px; }
  .home-hero > .hero-astro { grid-row: 1 / span 4; }
}
.hero-cta { display: none; align-items: center; gap: 10px; font-size: 17px; padding: 13px 34px; }
.hero-cta b { transition: transform .3s; } .hero-cta:hover b { transform: translateX(4px); }
@media screen { .home-hero > .hero-cta { animation: fadeUp .9s cubic-bezier(.2,.7,.2,1) 2.15s both; } }
@media screen {
  .screen.active { animation: screenIn .7s cubic-bezier(.2,.7,.2,1) both; }
  @keyframes screenIn { from { opacity: 0; transform: translateY(14px); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
  .score-fill { transition: width 1.4s cubic-bezier(.2,.7,.2,1) .25s; }
  .fx-ready .r-section[data-rv]:not(.in) .score-fill { width: 0 !important; }
  .mc-line { stroke-dasharray: 2400; stroke-dashoffset: 0; transition: stroke-dashoffset 2.2s cubic-bezier(.6,.05,.2,1) .2s; }
  .fx-ready .r-section[data-rv]:not(.in) .mc-line { stroke-dashoffset: 2400; }
  .mc-pt { transition: opacity .5s ease; transition-delay: calc(.5s + var(--k, 0) * 180ms); }
  .fx-ready .r-section[data-rv]:not(.in) .mc-pt { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .screen.active { animation: none; } .score-fill, .mc-line, .mc-pt { transition: none !important; } }
@media screen {
  .r-section h2 .h2-sub { display: block; font-size: .6em; letter-spacing: .24em; color: var(--ink-dim); margin-top: 2px; font-weight: 500; }
  .mc-detail p { font-weight: 400; color: #ddd0b4; }
  @media (max-width: 600px) { .mc-val { font-size: 15px; } .mc-mon { font-size: 15px; } .mc-lab { font-size: 13px; } .mc-axis { font-size: 12px; } }
}
@media screen {
  .progress { position: relative; width: max-content; margin-left: auto; margin-right: auto; gap: 46px; }
  .progress-dot { width: 48px; z-index: 1; }
  .progress::before, .progress::after { content: ''; position: absolute; left: 24px; top: 8px; height: 1px; }
  .progress::before { right: 24px; background: var(--hair); }
  .progress::after { width: var(--p, 0px); background: linear-gradient(90deg, var(--cinnabar), var(--gold-bright)); box-shadow: 0 0 8px rgba(239,211,148,.5); transition: width .6s cubic-bezier(.2,.7,.2,1); }
  .form-step.active { animation: stepIn .5s cubic-bezier(.2,.7,.2,1) both; }
  @keyframes stepIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
}
@media screen { .progress::before, .progress::after { top: 7px; } .progress-dot:not(.on)::before { background: #15120f; } }
@media screen { .form-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; } .form-nav .btn-gold, .form-nav .btn-ghost { margin: 0 !important; } .form-nav .btn-gold { min-width: 150px; } }
@media screen {
  .swatches { display: inline-flex; gap: 6px; margin-right: 10px; vertical-align: -4px; }
  .swatch { width: 20px; height: 20px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1.5px rgba(239,211,148,.55), 0 2px 8px rgba(0,0,0,.5); display: inline-block; }
}
@media screen {
  .result-actions { display: grid !important; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 520px; margin: 26px auto 22px !important; }
  .result-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; margin: 0 !important; width: 100%; padding: 13px 10px !important; font-size: 15px; letter-spacing: .08em; }
  .result-actions svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
  #btn-share { grid-column: 1 / -1; order: -2; font-size: 17px; padding: 15px 10px !important; }
  #btn-image { order: -1; } #btn-compact { order: 0; } #btn-friend { order: 1; } #btn-redo { order: 2; }
  #btn-print { grid-column: 1 / -1; order: 3; opacity: .8; }
}
@media screen { .promo-btn { white-space: nowrap; letter-spacing: .06em !important; font-size: 16px !important; padding-left: 22px !important; padding-right: 22px !important; } }
