:root {
  --ink: #090d22; --ink2: #10173a; --ink3: #18214d; --line: rgba(216, 178, 90, .28);
  --gold: #d8b25a; --gold2: #f3dc9a; --moon: #7fe0d6; --moon2: #bff3ec; --red: #c8382c; --red2: #e2554a;
  --text: #ece6d4; --muted: #a8a5bb; --dim: #6f6d86;
  --serif: 'Noto Serif TC', 'Songti TC', serif; --body: 'LXGW WenKai TC', 'Noto Serif TC', 'PingFang TC', sans-serif; --en: 'Cinzel', 'Noto Serif TC', serif;
  --r: 14px; --bar: 76px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ink); color: var(--text); font-family: var(--body); font-size: 17px; line-height: 1.75; overflow-x: hidden; min-height: 100vh; }
body.has-bar { padding-bottom: calc(var(--bar) + 12px); }
a { color: var(--gold2); }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; display: block; background: radial-gradient(ellipse at 50% -10%, #1d2a63 0%, var(--ink2) 35%, var(--ink) 75%); }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }

/* 頁首 */
header.top { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(8px); background: rgba(9, 13, 34, .72); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 58px; gap: 12px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--gold2); font-family: var(--serif); font-weight: 700; font-size: 20px; letter-spacing: .12em; white-space: nowrap; }
.logo .moon { width: 26px; height: 26px; border-radius: 50%; box-shadow: inset -7px -2px 0 0 var(--gold2); transform: rotate(-20deg); }
.logo small { font-family: var(--en); font-size: 10px; letter-spacing: .25em; color: var(--muted); display: block; line-height: 1; margin-top: 2px; }
.top nav { display: flex; gap: 6px; align-items: center; }
.chip { font-size: 13px; padding: 4px 10px; border-radius: 99px; border: 1px solid var(--line); color: var(--gold2); text-decoration: none; background: rgba(216, 178, 90, .06); white-space: nowrap; }
.chip.on { border-color: var(--moon); color: var(--moon2); }

/* 首頁 */
.hero { text-align: center; padding: 28px 0 8px; }
.hero h1 { font-family: var(--serif); font-size: clamp(30px, 7vw, 52px); letter-spacing: .2em; margin: 6px 0 4px; color: var(--gold2); text-shadow: 0 0 24px rgba(243, 220, 154, .35); }
.hero .en { font-family: var(--en); letter-spacing: .4em; color: var(--moon); font-size: 12px; }
.hero p { color: var(--muted); margin: 6px auto 0; max-width: 34em; }
.astro-box { position: relative; width: min(440px, 88vw); aspect-ratio: 1; margin: 10px auto 0; }
#astro { width: 100%; height: 100%; display: block; }
.seal { display: inline-block; font-family: var(--serif); color: #fff3ea; background: var(--red); padding: 2px 8px; border-radius: 4px; font-size: 13px; letter-spacing: .15em; box-shadow: 0 0 0 2px rgba(200, 56, 44, .35); transform: rotate(-3deg); }

.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0; }
.quick a { text-decoration: none; color: var(--text); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 10px; background: linear-gradient(160deg, rgba(24, 33, 77, .9), rgba(9, 13, 34, .8)); text-align: center; transition: transform .2s, border-color .2s; min-width: 0; }
.quick a:hover { transform: translateY(-2px); border-color: var(--gold); }
.quick .k { font-family: var(--en); font-size: 11px; color: var(--moon); letter-spacing: .2em; }
.quick .t { font-family: var(--serif); font-size: 17px; color: var(--gold2); }
.quick .v { font-size: 13px; color: var(--muted); line-height: 1.5; overflow-wrap: anywhere; }

.sec-title { text-align: center; font-family: var(--serif); color: var(--gold2); letter-spacing: .3em; margin: 34px 0 6px; font-size: 22px; }
.sec-title + .sub { text-align: center; color: var(--muted); margin: 0 0 16px; font-size: 15px; }
.gates { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.gate { position: relative; text-decoration: none; color: var(--text); text-align: center; padding: 26px 8px 16px; border: 1px solid var(--line); border-radius: 999px 999px 12px 12px; background: linear-gradient(180deg, rgba(127, 224, 214, .08), rgba(16, 23, 58, .92) 45%); overflow: hidden; transition: transform .25s, box-shadow .25s, border-color .25s; min-width: 0; }
.gate::before { content: ''; position: absolute; inset: 6px; border: 1px dashed rgba(216, 178, 90, .25); border-radius: 999px 999px 8px 8px; pointer-events: none; }
.gate:hover { transform: translateY(-4px); border-color: var(--gold); box-shadow: 0 10px 30px rgba(127, 224, 214, .12); }
.gate .glyph { font-size: 34px; line-height: 1.2; color: var(--gold2); font-family: var(--serif); }
.gate .n { font-family: var(--serif); font-size: 18px; letter-spacing: .1em; color: var(--gold2); }
.gate .e { font-family: var(--en); font-size: 10px; letter-spacing: .2em; color: var(--moon); }
.gate .d { font-size: 13px; color: var(--muted); line-height: 1.5; margin-top: 4px; }
.gate .free { position: absolute; top: 10px; right: 50%; transform: translateX(50%); font-size: 11px; color: var(--moon2); letter-spacing: .1em; }

.banner { border: 1px solid var(--moon); background: rgba(127, 224, 214, .08); border-radius: var(--r); padding: 10px 14px; display: flex; gap: 10px; align-items: center; justify-content: space-between; margin: 14px 0; flex-wrap: wrap; }
.banner p { margin: 0; font-size: 15px; }

/* 卡片與表單 */
.panel { border: 1px solid var(--line); border-radius: var(--r); background: rgba(16, 23, 58, .82); padding: 18px; margin: 16px 0; }
.page-head { text-align: center; margin: 22px 0 6px; }
.page-head h2 { font-family: var(--serif); color: var(--gold2); letter-spacing: .2em; font-size: 28px; margin: 0; }
.page-head .en { font-family: var(--en); font-size: 11px; letter-spacing: .35em; color: var(--moon); }
.page-head p { color: var(--muted); margin: 4px 0 0; font-size: 15px; }
label.f { display: block; margin: 10px 0; font-size: 15px; color: var(--muted); }
label.f > span { display: block; margin-bottom: 4px; }
input[type=text], input[type=email], input[type=date], select, textarea { width: 100%; background: rgba(9, 13, 34, .8); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; color: var(--text); font-size: 16px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--moon); outline-offset: 1px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-block; padding: 5px 12px; border: 1px solid var(--line); border-radius: 99px; font-size: 14px; color: var(--muted); }
.seg input:checked + span { border-color: var(--gold); color: var(--ink); background: var(--gold); }
.seg input:focus-visible + span { outline: 2px solid var(--moon); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; padding: 12px 22px; border-radius: 99px; font-family: var(--serif); font-size: 17px; letter-spacing: .12em; text-decoration: none; color: #2a1a00; background: linear-gradient(180deg, var(--gold2), var(--gold)); box-shadow: 0 4px 18px rgba(216, 178, 90, .25); }
.btn:disabled { opacity: .5; cursor: wait; }
.btn.ghost { background: transparent; color: var(--gold2); border: 1px solid var(--gold); box-shadow: none; }
.btn.red { background: linear-gradient(180deg, var(--red2), var(--red)); color: #fff4ec; }
.btn.block { width: 100%; }
.center { text-align: center; }
.err { color: #ffb4a8; font-size: 15px; min-height: 1.4em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* 結果 */
.result h3 { font-family: var(--serif); color: var(--gold2); margin: 0 0 8px; font-size: 19px; letter-spacing: .06em; }
.result .sec { padding: 14px 0; border-top: 1px dashed rgba(216, 178, 90, .2); }
.result .sec:first-child { border-top: 0; padding-top: 0; }
.result p { margin: 6px 0; }
.result ul { margin: 6px 0; padding-left: 1.3em; }
.result .note { font-size: 13px; color: var(--dim); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 6px 0; }
.kv dt { color: var(--moon); font-family: var(--serif); white-space: nowrap; }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.tbl { overflow-x: auto; margin: 8px 0; max-width: 100%; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { border-bottom: 1px solid rgba(216, 178, 90, .18); padding: 6px 8px; text-align: left; vertical-align: top; }
th { color: var(--moon); font-family: var(--serif); font-weight: 600; white-space: nowrap; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { border: 1px solid var(--line); border-radius: 99px; padding: 2px 10px; font-size: 14px; color: var(--gold2); }
.poem { font-family: var(--serif); font-size: 21px; letter-spacing: .18em; line-height: 2; color: var(--gold2); text-align: center; margin: 8px 0; }
.poem div { white-space: nowrap; }
.hook { border-left: 3px solid var(--red); background: rgba(200, 56, 44, .08); padding: 10px 14px; border-radius: 0 10px 10px 0; font-family: var(--serif); color: #ffe4d8; margin: 14px 0; }
.chart svg { width: 100%; height: auto; display: block; }

/* 上鎖區塊 */
.locked { position: relative; border: 1px solid var(--gold); border-radius: var(--r); padding: 16px; background: repeating-linear-gradient(135deg, rgba(216, 178, 90, .04) 0 12px, transparent 12px 24px), rgba(16, 23, 58, .9); }
.locked .lhead { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.locked .lhead b { font-family: var(--serif); color: var(--gold2); font-size: 18px; }
.locked ol { list-style: none; padding: 0; margin: 10px 0; }
.locked li { padding: 8px 0; border-bottom: 1px dashed rgba(216, 178, 90, .18); }
.locked li .tt { font-family: var(--serif); color: var(--gold2); }
.locked li .tt::before { content: '🔒 '; font-size: 13px; }
.locked li .pv { color: var(--muted); font-size: 15px; }
.locked li .pv i { font-style: normal; filter: blur(4px); user-select: none; color: var(--dim); }
.next { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px dashed var(--moon); border-radius: var(--r); padding: 12px 14px; margin: 16px 0; text-decoration: none; color: var(--moon2); }
.next b { font-family: var(--serif); }

/* 解鎖列 */
.unlock-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: linear-gradient(180deg, rgba(16, 23, 58, .96), rgba(9, 13, 34, .99)); border-top: 1px solid var(--gold); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
.unlock-bar .in { max-width: 980px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.unlock-bar .tx { line-height: 1.35; min-width: 0; }
.unlock-bar .tx b { font-family: var(--serif); color: var(--gold2); font-size: 16px; display: block; }
.unlock-bar .tx span { font-size: 13px; color: var(--muted); }
.unlock-bar .btn { padding: 10px 16px; font-size: 15px; white-space: nowrap; flex: none; }

/* 方案 */
.plans { display: grid; gap: 10px; }
.plan { display: block; position: relative; border: 1px solid var(--line); border-radius: var(--r); padding: 14px 14px 14px 44px; cursor: pointer; background: rgba(9, 13, 34, .6); }
.plan input { position: absolute; left: 16px; top: 18px; accent-color: var(--gold); width: 18px; height: 18px; }
.plan:has(input:checked) { border-color: var(--gold); background: rgba(216, 178, 90, .08); }
.plan .pn { font-family: var(--serif); color: var(--gold2); font-size: 17px; }
.plan .pp { float: right; font-family: var(--en); color: var(--gold2); font-size: 20px; }
.plan .pd { font-size: 14px; color: var(--muted); clear: both; }
.include { columns: 2; font-size: 14px; color: var(--muted); padding-left: 1.2em; margin: 8px 0; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; color: var(--muted); margin: 10px 0; }
.trust span::before { content: '✓ '; color: var(--moon); }

/* 頁尾 */
footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 20px 0 30px; color: var(--dim); font-size: 13px; text-align: center; }
footer a { color: var(--muted); margin: 0 6px; }

/* ===== 各占卜動畫 ===== */
.stage { min-height: 220px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 14px; padding: 10px 0; }

/* 塔羅 */
.cards { display: flex; gap: 12px; justify-content: center; flex-wrap: nowrap; perspective: 900px; width: 100%; max-width: 480px; padding-bottom: 26px; }
.tcard { width: 30%; max-width: 150px; aspect-ratio: 0.6; position: relative; transform-style: preserve-3d; transition: transform .9s cubic-bezier(.3, 1.4, .5, 1); cursor: pointer; }
.tcard.flipped { transform: rotateY(180deg); }
.tcard .face { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 10px; border: 1px solid var(--gold); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 6px; overflow: hidden; }
.tcard .back { background: radial-gradient(circle at 50% 50%, rgba(127, 224, 214, .25), transparent 40%), repeating-conic-gradient(from 0deg, rgba(216, 178, 90, .25) 0 10deg, transparent 10deg 20deg), var(--ink3); }
.tcard .back::after { content: '☾'; font-size: 34px; color: var(--gold2); }
.tcard .front { transform: rotateY(180deg); background: linear-gradient(180deg, #1f2a5e, #0e1433); }
.tcard .front .num { font-family: var(--en); color: var(--moon); font-size: 12px; }
.tcard .front .sym { font-size: 36px; color: var(--gold2); line-height: 1.3; }
.tcard .front .nm { font-family: var(--serif); color: var(--gold2); font-size: 15px; line-height: 1.3; }
.tcard .front .enm { font-family: var(--en); font-size: 9px; color: var(--muted); }
.tcard.rev .front .inner { transform: rotate(180deg); }
.tcard .front .inner { display: flex; flex-direction: column; align-items: center; transition: transform .4s; }
.tcard .pos { position: absolute; bottom: -26px; left: 0; right: 0; text-align: center; font-size: 13px; color: var(--moon); transform: rotateY(0); }
.tcard.flipped .pos { transform: rotateY(180deg); }
.tcard:not(.flipped) .pos .rv { display: none; }

/* 烏龜卦 */
.turtle { width: 150px; height: 120px; position: relative; }
.turtle.shake { animation: shake .5s ease-in-out 2; }
@keyframes shake { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-12deg) translateY(-4px); } 40% { transform: rotate(10deg); } 60% { transform: rotate(-8deg) translateY(-3px); } 80% { transform: rotate(6deg); } }
.coins { display: flex; gap: 10px; min-height: 46px; }
.coin { width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 15px; color: #3a2800; background: radial-gradient(circle at 35% 30%, #fbe9b2, #c99a3c 70%); border: 2px solid #8a6420; position: relative; animation: drop .45s ease-out both; }
.coin::after { content: ''; position: absolute; width: 11px; height: 11px; border: 2px solid #8a6420; background: var(--ink2); }
.coin span { position: absolute; top: 1px; font-size: 11px; }
.coin.bei { background: radial-gradient(circle at 35% 30%, #e7d8b0, #9c8150 70%); }
@keyframes drop { from { transform: translateY(-40px) rotate(-200deg); opacity: 0; } to { transform: none; opacity: 1; } }
.hexlines { display: flex; max-width: 100%; flex-direction: column-reverse; gap: 7px; width: 170px; }
.yao { display: flex; align-items: center; gap: 8px; height: 14px; animation: fadein .4s both; }
.yao .bar { flex: 1; height: 12px; display: flex; gap: 14px; }
.yao .bar i { flex: 1; background: linear-gradient(90deg, var(--gold), var(--gold2)); border-radius: 2px; }
.yao .mk { width: 18px; font-size: 13px; color: var(--red2); }
.yao .lb { width: 18px; font-size: 12px; color: var(--muted); }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* 求籤 */
.temple { display: flex; gap: 28px; align-items: flex-end; justify-content: center; min-height: 170px; }
.jiao { display: flex; gap: 6px; }
.jiao b { width: 46px; height: 24px; display: block; background: var(--red); border-radius: 46px 46px 6px 6px / 40px 40px 6px 6px; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .25); transition: transform .3s; }
.jiao b.flat { border-radius: 6px 6px 46px 46px / 6px 6px 40px 40px; background: #a5281f; }
.jiao.toss b { animation: toss .7s ease-out both; }
.jiao.toss b:nth-child(2) { animation-delay: .08s; }
@keyframes toss { 0% { transform: translateY(0) rotate(0); } 40% { transform: translateY(-70px) rotate(380deg); } 100% { transform: translateY(0) rotate(720deg); } }
.tube { width: 74px; height: 120px; position: relative; }
.tube .body { position: absolute; bottom: 0; left: 0; right: 0; height: 84px; background: linear-gradient(90deg, #6a3a14, #a8652a 40%, #6a3a14); border-radius: 6px 6px 10px 10px; border: 2px solid var(--gold); }
.tube .body::after { content: '籤'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--serif); color: var(--gold2); font-size: 22px; }
.tube .sticks { position: absolute; bottom: 70px; left: 8px; right: 8px; height: 50px; display: flex; justify-content: space-around; align-items: flex-end; }
.tube .sticks i { width: 5px; height: 46px; background: #e9cf8e; border-radius: 2px 2px 0 0; }
.tube .sticks i:nth-child(odd) { height: 40px; }
.tube.shake { animation: tubeShake .18s linear 8; transform-origin: 50% 100%; }
@keyframes tubeShake { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }
.tube .out { position: absolute; left: 30px; bottom: 80px; width: 8px; height: 70px; background: #f3dc9a; border-radius: 3px; animation: pop .8s ease-out both; }
@keyframes pop { from { transform: translateY(20px); opacity: 0; } to { transform: translate(40px, -40px) rotate(35deg); opacity: 1; } }
.steps { display: flex; flex-direction: column; gap: 4px; font-size: 15px; text-align: center; }
.steps .ok { color: var(--moon2); }
.steps .ng { color: var(--muted); }

/* 鳥卦 */
.birdbox { position: relative; width: 100%; max-width: 520px; height: 190px; }
.envs { position: absolute; bottom: 0; left: 0; right: 0; display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; }
.env { height: 62px; background: linear-gradient(180deg, #f3e3b8, #d8bf86); border-radius: 3px; position: relative; transition: transform .4s; }
.env::after { content: ''; position: absolute; top: 6px; left: 20%; right: 20%; height: 10px; background: var(--red); border-radius: 2px; }
.env.picked { transform: translateY(-58px) rotate(-8deg); box-shadow: 0 0 18px var(--gold2); }
.bird { position: absolute; bottom: 62px; width: 46px; height: 40px; transition: left .45s ease-in-out; }
.bird.hop { animation: hop .45s ease-in-out; }
@keyframes hop { 50% { transform: translateY(-26px); } }

/* 水晶球 */
.ball { width: 200px; height: 200px; border-radius: 50%; position: relative; overflow: hidden; background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .55), rgba(191, 243, 236, .18) 25%, rgba(29, 42, 99, .65) 60%, #0b1026 100%); box-shadow: 0 0 40px rgba(127, 224, 214, .35), inset 0 0 40px rgba(127, 224, 214, .25); }
.ball .fog { position: absolute; inset: -30%; background: radial-gradient(circle at 30% 40%, rgba(220, 230, 255, .35), transparent 40%), radial-gradient(circle at 70% 60%, rgba(191, 243, 236, .3), transparent 45%), radial-gradient(circle at 50% 80%, rgba(180, 160, 255, .25), transparent 40%); animation: fog 7s linear infinite; filter: blur(6px); }
.ball .fog.b { animation-duration: 11s; animation-direction: reverse; opacity: .7; }
@keyframes fog { to { transform: rotate(360deg); } }
.ball-base { width: 140px; height: 26px; margin-top: -6px; background: linear-gradient(180deg, #8a6420, #3d2a0c); border-radius: 50% 50% 8px 8px / 70% 70% 8px 8px; }
.typed { font-family: var(--serif); font-size: 18px; color: var(--moon2); min-height: 4em; max-width: 34em; text-align: center; }
.typed::after { content: '▍'; animation: blink 1s steps(1) infinite; color: var(--moon); }
.typed.done::after { content: ''; }
@keyframes blink { 50% { opacity: 0; } }

/* 八字 */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; max-width: 420px; }
.pillar { border: 1px solid var(--line); border-radius: 12px; text-align: center; padding: 8px 4px; background: rgba(9, 13, 34, .6); animation: fadein .5s both; }
.pillar .lb { font-size: 12px; color: var(--muted); }
.pillar .ch { font-family: var(--serif); font-size: 32px; line-height: 1.25; color: var(--gold2); }
.pillar .el { font-size: 12px; color: var(--moon); }
.pillar.day { border-color: var(--red); box-shadow: 0 0 12px rgba(200, 56, 44, .3); }
.el-bars { display: flex; gap: 8px; align-items: flex-end; height: 70px; }
.el-bars div { width: 34px; text-align: center; font-size: 12px; color: var(--muted); }
.el-bars i { display: block; background: linear-gradient(180deg, var(--moon), #2f6f8a); border-radius: 4px 4px 0 0; margin: 0 auto 2px; width: 22px; }

/* 農民曆 */
.almanac-page { width: 220px; border-radius: 10px; overflow: hidden; background: #f6efdd; color: #3a2a12; text-align: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); font-family: var(--serif); }
.almanac-page .top { background: var(--red); color: #fff3ea; padding: 4px; font-size: 14px; letter-spacing: .2em; }
.almanac-page .day { font-size: 64px; line-height: 1.1; font-family: var(--en); color: var(--red); }
.almanac-page .lu { font-size: 15px; }
.almanac-page .gz { font-size: 13px; color: #6b5636; padding-bottom: 8px; }

/* 星座 */
.zbars { width: 100%; max-width: 420px; }
.zbar { display: grid; grid-template-columns: 3em 1fr 2.5em; gap: 8px; align-items: center; font-size: 14px; }
.zbar .tr { height: 8px; background: rgba(255, 255, 255, .08); border-radius: 4px; overflow: hidden; }
.zbar .tr i { display: block; height: 100%; background: linear-gradient(90deg, var(--moon), var(--gold2)); border-radius: 4px; animation: grow 1s ease-out both; transform-origin: left; }
@keyframes grow { from { transform: scaleX(0); } }
.zsym { font-size: 54px; color: var(--gold2); line-height: 1; }

/* 預覽版切換 */
.preview-toggle { position: fixed; bottom: calc(var(--bar) + 24px); left: 10px; z-index: 40; background: rgba(200, 56, 44, .92); color: #fff; border-radius: 10px; padding: 6px 10px; font-size: 12px; box-shadow: 0 4px 14px rgba(0, 0, 0, .4); }
.preview-toggle button { background: #fff; color: var(--red); border: 0; border-radius: 6px; padding: 2px 8px; margin-left: 4px; cursor: pointer; font-size: 12px; }

.modal { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .6); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal .panel { max-width: 420px; width: 100%; }

@media (max-width: 720px) {
  .gates { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .quick { gap: 8px; }
  .quick .v { display: none; }
  .row2 { grid-template-columns: 1fr; }
  .include { columns: 1; }
  .top nav .hide-sm { display: none; }
  body { font-size: 16px; }
  .poem { font-size: 18px; letter-spacing: .1em; }
}
@media (max-width: 400px) {
  .logo { font-size: 17px; letter-spacing: .06em; }
  .unlock-bar .tx span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* 理念 */
.creed { text-align: center; margin-top: 30px; background: radial-gradient(ellipse at 50% 0%, rgba(127, 224, 214, .12), transparent 70%), rgba(16, 23, 58, .85); }
.creed .en { font-family: var(--en); font-size: 11px; letter-spacing: .35em; color: var(--moon); }
.creed h3 { font-family: var(--serif); color: var(--gold2); font-size: 21px; letter-spacing: .08em; margin: 4px 0 10px; }
.creed p { max-width: 36em; margin: 8px auto; color: var(--text); }
.practice-grid { grid-template-columns: repeat(3, 1fr); }
.practice-grid .t { font-size: 16px; }
.practice-grid .pg { font-family: var(--serif); font-size: 26px; color: var(--gold2); line-height: 1.3; }
/* 回家測試 */
.tabs-row { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 12px 0; }
.duty { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.duty div { border: 1px dashed var(--line); border-radius: 10px; padding: 8px 12px; font-size: 15px; }
.duty b { display: block; font-family: var(--serif); color: var(--moon); }
.ph { font-family: var(--serif); color: var(--gold2); font-size: 18px; margin: 14px 0 4px; }
.psteps li { margin: 6px 0; }
.steps-wrap { display: flex; gap: 16px; align-items: flex-start; }
.steps-wrap .psteps { flex: 1; min-width: 0; margin: 0; padding-left: 1.4em; }
.diagram { width: 180px; flex: none; }
.diagram.wide { width: 100%; max-width: 360px; display: block; margin: 6px auto; }
.coin-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px dashed rgba(216, 178, 90, .15); }
.coin-row > span { width: 8.5em; font-size: 14px; color: var(--muted); }
.journal-box { border-top: 1px dashed var(--line); margin-top: 16px; padding-top: 12px; }
.jrow { padding: 10px 0; border-bottom: 1px dashed rgba(216, 178, 90, .18); }
.jrow .seg { margin-top: 6px; align-items: center; }
@media (max-width: 720px) {
  .duty { grid-template-columns: 1fr; }
  .steps-wrap { flex-direction: column; align-items: center; }
  .diagram { width: 160px; }
  .practice-grid .v { display: block; font-size: 12px; }
}

.laws { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; text-align: left; }
.laws div { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: rgba(9, 13, 34, .5); }
.laws b { display: block; font-family: var(--serif); color: var(--moon2); letter-spacing: .1em; margin-bottom: 4px; }
.laws span { font-size: 15px; color: var(--text); }
@media (max-width: 720px) { .laws { grid-template-columns: 1fr; } }

/* 拍照上傳 */
.photo-box { border: 1px dashed var(--moon); border-radius: var(--r); padding: 14px; margin: 12px 0; text-align: center; }
.photo-pick { display: inline-block; cursor: pointer; margin: 4px 0; }
.photo-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.photo-pick input:focus-visible + .btn { outline: 2px solid var(--moon); }
.photo-preview { display: block; max-width: 240px; max-height: 240px; margin: 10px auto; border-radius: 10px; border: 1px solid var(--line); object-fit: contain; }
.consent { display: flex; gap: 8px; align-items: flex-start; text-align: left; font-size: 14px; color: var(--muted); margin-top: 10px; }
.consent input { margin-top: 5px; accent-color: var(--gold); }
details.manual { margin: 8px 0 14px; }
details.manual summary { cursor: pointer; color: var(--moon2); font-size: 15px; }

.plan.single { padding-left: 14px; border-color: var(--gold); background: rgba(216, 178, 90, .08); }
.gifts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.gifts span { border: 1px solid var(--line); border-radius: 99px; padding: 2px 10px; font-size: 14px; color: var(--gold2); }

/* 下載完整報告：列印成 PDF */
@media print {
  @page { margin: 14mm; }
  body { background: #fff !important; color: #111 !important; font-size: 12pt; padding: 0 !important; }
  #sky, header.top, footer, #bar, .preview-toggle, #form, #stage, .hook, .journal-box, .next, #again, #saveReport, .center .small, .page-head .en, nav, #journal, .banner { display: none !important; }
  .panel, .result { background: #fff !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; }
  .result h3, .page-head h2, .poem, .kv dt, th { color: #6b4b00 !important; }
  .result p, .result li, td, .kv dd, .tags span, .note { color: #111 !important; }
  .sec { break-inside: avoid; }
  a { color: #111 !important; text-decoration: none; }
}
