/* Smooth black and luminous gold; locally hosted SIL OFL typography. */
.hex-card .hex-title{line-height:1.5;overflow-wrap:anywhere}
.trigram-caption{display:flex;flex-wrap:wrap;gap:4px 18px}.trigram-caption p{margin:0}
.hex-card-body{display:grid;grid-template-columns:100px minmax(0,1fr);align-items:center;gap:24px;margin:22px 0}
.hex-card .hex-card-body .hex-figure{width:100%;margin:0}
.related-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border:1px solid var(--border);border-radius:8px;overflow:hidden}
.related-cell{padding:12px 10px;background:#e8c67e03;min-width:0}
.related-cell:nth-child(odd){border-right:1px solid var(--border)}.related-cell:nth-child(-n+2){border-bottom:1px solid var(--border)}
.related-cell>div{display:flex;align-items:center;gap:10px;min-height:62px}.related-cell strong{font-size:18px;font-weight:500;color:#f0d393;text-shadow:0 0 12px #e3b65a50}
.related-note{font-size:10px;color:var(--muted)}.mini-hex{display:flex;flex-direction:column;gap:4px;width:28px;flex:none}.mini-line{display:flex;gap:0;height:3px}.mini-line i{flex:1;background:#c8a55e;box-shadow:0 0 5px #e3b65a30}.mini-line.split{gap:5px}
.world-panel{margin:22px 0;padding:32px;border:1px solid var(--border);border-radius:12px;background:radial-gradient(ellipse at 27% 45%,#b17c1710,transparent 65%),#0c0c0b}
.world-heading{display:flex;align-items:center;justify-content:space-between;gap:18px}.world-heading h3{font-size:26px;letter-spacing:5px;color:#f4dda2;margin:6px 0;text-shadow:0 0 20px #dbac4c40}.world-heading .eyebrow{margin:0}.demo-badge{font-size:11px;padding:6px 10px;border:1px solid #8d75433d;border-radius:30px;color:#c6b690}
.world-controls{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:22px 0 0;font-size:12px;color:#bba77b}.world-controls select{background:#14120e;color:#ffe3a1;border:1px solid #665330;border-radius:6px;padding:8px 24px 8px 12px;font:inherit;margin-left:10px}.flow-key{display:flex;gap:16px}.flow-key span:last-child{color:#ffe3a1}
.world-layout{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(240px,1fr);gap:24px;align-items:center}.flow-map{min-width:0}.flow-map svg{width:100%;display:block;overflow:visible}.orbit{fill:none;stroke:#9b793d40}.orbit.inner{stroke-dasharray:2 9;stroke:#9b793d25}.flow-core{fill:#100e09;stroke:#d3ac583d}.flow-center{fill:#ffe4a4;font-size:30px;filter:drop-shadow(0 0 8px #d9a84b80)}.flow-center-note{fill:#aa956c;font-size:9px}
.flow-node{cursor:pointer;outline:none}.flow-node circle{fill:#11100c;stroke:#755d3440}.flow-node text{font-size:11px;fill:#b7a17b;pointer-events:none}.flow-node:hover circle,.flow-node:focus circle,.flow-node.selected circle{stroke:#ffe2a0;fill:#3c2d12;filter:drop-shadow(0 0 5px #eabc5b90)}.flow-node.selected text,.flow-node:focus text{fill:#fff0c6}.flow-link{fill:none;opacity:.65}.flow-link.in{stroke:#a88751}.flow-link.out{stroke:#ffe3a1;filter:drop-shadow(0 0 3px #eac47350)}.flow-link:hover{opacity:1}
.flow-reading{display:grid;grid-template-columns:1fr 1fr;gap:18px}.flow-ranking h4{color:#c2a16b;font-size:19px;margin:0 0 8px}.flow-ranking.out h4{color:#ffe3a1}.flow-ranking h4 span{font-size:13px;font-weight:400}.flow-ranking .small{font-size:10px;line-height:1.8}.flow-ranking ol{padding:0;list-style:none}.flow-ranking li{display:grid;grid-template-columns:1fr auto;gap:4px;padding:10px 0;border-bottom:1px solid #ba974024;color:#e2cd9e;font-size:13px}.flow-ranking li small{grid-column:1/-1;color:#8d8168;font-size:10px}.flow-ranking li strong{font-weight:400}.flow-remainder,.flow-footnote{font-size:11px;color:#998b70;line-height:1.9}.flow-footnote{border-top:1px solid var(--border);padding-top:18px;margin-bottom:0}
@media(min-width:761px) and (max-width:1000px){.hex-card-body{grid-template-columns:65px minmax(0,1fr);gap:12px}.related-cell{padding:8px 6px}.related-cell>div{gap:5px}.related-cell strong{font-size:15px}}
@media(max-width:760px){.world-panel{padding:20px 14px}.world-heading{align-items:flex-start;flex-direction:column;gap:8px}.world-layout{grid-template-columns:1fr;gap:0}.flow-map{overflow-x:auto}.flow-map svg{min-width:520px}.world-controls{flex-wrap:wrap}.flow-reading{gap:24px;padding:0 8px}.hex-card-body{grid-template-columns:80px minmax(0,1fr);gap:16px}.related-cell{padding:10px 7px}.related-cell>div{gap:7px}.related-cell strong{font-size:16px}.flow-key{font-size:10px}}
.calendar-panel{display:flex;align-items:center;justify-content:center;gap:18px;margin:22px auto 12px}
.moon-figure{width:64px;height:64px;flex:none;filter:drop-shadow(0 0 9px #e8ba4d30)}
.moon-figure svg{display:block;width:100%;height:100%}
.calendar-copy{text-align:left}.calendar-copy p{margin:5px 0;line-height:1.9}
#result-meta{color:#eaca83;letter-spacing:1px}
.calendar-details{max-width:560px;margin:0 auto 24px;color:var(--muted);font-size:12px;line-height:1.9;text-align:left}
.calendar-details summary{text-align:center;cursor:pointer;min-height:32px}
.calendar-details p{margin:8px 0}.calendar-details[open]{padding:10px 16px;border:1px solid var(--border);border-radius:6px}
@media(max-width:760px){.calendar-panel{gap:10px}.moon-figure{width:50px;height:50px}#result-meta{font-size:14px;letter-spacing:0}.calendar-copy{min-width:0}}
.intro h1 span{margin-left:.55em}
@media(max-width:760px){.intro h1 span{margin-left:0}}
/* Camera tilt stays outside the coin's local spin so either face rests on
   the same inclined plane. Readouts remain upright in screen space. */
.coin-stage{--camera-tilt:42deg}
.coin-camera{position:absolute;inset:0;transform-style:preserve-3d;transform:rotateX(var(--camera-tilt))}
/* Cut through every depth slice, not only the two decorated faces.
   Edge slices occupy 4–96% of the face, so their local hole is 39.13–60.87%. */
.coin-edge{clip-path:polygon(evenodd,0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,39.13% 39.13%,39.13% 60.87%,60.87% 60.87%,60.87% 39.13%,39.13% 39.13%)}
.coin-magic-plane{position:absolute;inset:0;pointer-events:none;transform-style:preserve-3d}
.coin-gather-ring{position:absolute;inset:-28%;border:3px solid #fff0be;border-radius:50%;filter:blur(2.5px);box-shadow:0 0 7px #ffe09e,inset 0 0 8px #ffcf70,0 0 18px #e7ae4280;animation:magic-gather .2s cubic-bezier(.55,.05,.85,.45) both}
.coin-gather-outer{animation-delay:.07s;inset:-28%;border-width:7px;border-color:#ffda8870;filter:blur(4.5px);box-shadow:0 0 16px #ffcf7880,inset 0 0 14px #ffd89070,0 0 28px #e7ae4245}
@keyframes magic-gather{0%{transform:scale(1);opacity:0}18%{opacity:.85}75%{opacity:1}100%{transform:scale(.015);opacity:0}}
@media(prefers-reduced-motion:reduce){.coin-magic-plane{display:none}}
.ritual-sigil{transform:perspective(850px) rotateX(var(--camera-tilt));transform-origin:50% 50%}
:root{--bg:#080808;--panel:#11100e;--gold:#e5bc64;--bright:#fff0c1;--text:#f0ebe0;--muted:#aaa69d;--border:#3e3422;--sans:'Noto Sans TC',system-ui,'Microsoft JhengHei',sans-serif;--serif:var(--sans)}
body{background:radial-gradient(ellipse at 50% 32%,#b67c1820,transparent 43%),radial-gradient(ellipse at 50% 0%,#5a391218,transparent 55%),var(--bg)}
main,.site-header,footer{position:relative;z-index:1}
.site-header{height:86px;border-bottom-color:#d7ae4d20}
.brand{font-family:var(--sans);font-size:18px;letter-spacing:3px;font-weight:600;color:var(--gold)}
.intro{padding-top:62px}.intro h1{font-size:clamp(34px,4.5vw,58px);font-weight:600;letter-spacing:3px;line-height:1.5;color:#fff6df}.intro h1 span{color:#ffe3a0;text-shadow:0 0 16px #ffd17f50,0 0 60px #d88e2535}.intro-copy{font-size:16px;line-height:2.1}.eyebrow{color:#e1be78;letter-spacing:5px}
h2,h3{font-weight:600}.steps{color:#9a9386}.steps b{background:linear-gradient(90deg,transparent,#9d793b80,transparent)}.steps .active{color:#ffdf91;text-shadow:0 0 16px #ffc35380}
.ritual-layout{position:relative;border-color:#aa823d70;border-radius:12px;background:linear-gradient(135deg,#1b1710a0,#0b0b0bf2 65%);box-shadow:0 0 70px #b77b1010,inset 0 1px #ffe7ad20}
.ritual-layout:before{content:'';position:absolute;left:15%;right:15%;top:0;height:1px;background:linear-gradient(90deg,transparent,#ffe5a6,transparent);box-shadow:0 0 15px #ffd27e;pointer-events:none}
.ritual-panel{padding-top:30px}.progress-panel{background:linear-gradient(180deg,#17130d90,#09090980);border-left-color:#9e79313d}
.ritual-sigil{position:absolute;width:min(100%,340px);height:280px;z-index:-1;color:#d9ae52;opacity:.33;filter:drop-shadow(0 0 4px #d4a64760);pointer-events:none}
/* Gather on the same plane; at 400 ms the halo converges and the coins lift. */
.ritual-gather{position:absolute;width:min(100%,340px);height:280px;z-index:-1;pointer-events:none;overflow:visible;transform:perspective(850px) rotateX(var(--camera-tilt));transform-origin:50% 50%}
.ritual-gather circle{opacity:0;fill:none;stroke:#ffe4a3;stroke-width:5;transform-origin:170px 140px;filter:blur(2px) drop-shadow(0 0 9px #eabe67)}
.coin-stage:has(.coins.tossing) .ritual-gather circle{animation:sigil-gather .4s cubic-bezier(.55,.05,.85,.45) both}
@keyframes sigil-gather{0%{opacity:0;transform:scale(1.15)}18%{opacity:.8}85%{opacity:1}100%{opacity:0;transform:scale(0)}}
.coin-stage:has(.coins.tossing) .ritual-sigil{animation:sigil-ignite 2s .4s linear forwards}
@keyframes sigil-ignite{
 0%{opacity:1;color:#fffbe9;filter:brightness(1.55) drop-shadow(0 0 5px #fff4cf) drop-shadow(0 0 18px #ffd579ee) drop-shadow(0 0 42px #efb94ca6)}
 100%{opacity:.33;color:#d9ae52;filter:brightness(1) drop-shadow(0 0 4px #d4a64760) drop-shadow(0 0 18px #ffd57900) drop-shadow(0 0 42px #efb94c00)}
}
@media(prefers-reduced-motion:reduce){.ritual-gather{display:none}.coin-stage:has(.coins.tossing) .ritual-sigil{animation:none;opacity:.46}}
.coin-stage{background:radial-gradient(ellipse at center,#edb84712,transparent 65%)}
.coin-edge{background:linear-gradient(110deg,#8e6222,#ffe3a0 35%,#8b5c1d 70%,#deb766)}
.primary{background:linear-gradient(115deg,#f8dda1,#dfb253 55%,#f2cf7f);border-color:#f5d68e;color:#1b1206;border-radius:5px;box-shadow:0 0 20px #f0b43b17,inset 0 1px #fff5d6;font-weight:700}
.primary:hover:not(:disabled){background:linear-gradient(115deg,#fff0bd,#f3c96f 55%,#ffe3a1);box-shadow:0 0 30px #eab34740}.primary:disabled{opacity:.65}
textarea{background:#080808bb;border-color:#8b6b354f;border-radius:6px}textarea::placeholder{color:#9b9588}textarea:focus{border-color:#dcb865;box-shadow:0 0 20px #d5a84a12}.secondary{border-color:#9a783d;border-radius:5px}
.line-bars{filter:drop-shadow(0 0 7px #edc26870)}.line-bars i{background:#eaca83}.moving .line-bars i{background:#fff1b3;box-shadow:0 0 12px #ffd16d,0 0 25px #e5a42f50}.live-row.pending .line-bars i{background:#51432b}.position{color:#a49b87}.progress-track{background:#453720}.aside-note{color:#a9a293;line-height:2.1;font-size:14px}
.hex-card{background:linear-gradient(135deg,#231b1090,#0d0c0b);border-color:#9c773b75;border-radius:9px;box-shadow:inset 0 1px #ffdf9420,0 0 30px #d8a3430a}.hex-card h3{font-weight:600;text-shadow:0 0 12px #ffdb8860,0 0 35px #d99d3550}.hex-card .verse,.changing-verse p{font-size:18px;line-height:2.1}
.text-panel{background:#10100ecc;border-radius:8px}.prompt-panel{background:linear-gradient(120deg,#29200f75,#10100e);border-color:#7d5c2d;border-radius:9px}.result-heading h2{font-weight:600}.privacy{font-size:13px}footer{color:#9b9486}
.embers{position:fixed;inset:0;overflow:hidden;pointer-events:none;z-index:0}.embers i{position:absolute;bottom:-20px;width:3px;height:3px;border-radius:50%;background:#ffdd8c;box-shadow:0 0 8px #f4be54;animation:ember-rise 18s linear infinite;opacity:0}.embers i:nth-child(1){left:7%;animation-delay:-3s}.embers i:nth-child(2){left:19%;animation-delay:-11s;width:2px;height:2px}.embers i:nth-child(3){left:34%;animation-delay:-7s}.embers i:nth-child(4){left:47%;animation-delay:-15s;width:2px;height:2px}.embers i:nth-child(5){left:62%;animation-delay:-1s}.embers i:nth-child(6){left:76%;animation-delay:-13s}.embers i:nth-child(7){left:86%;animation-delay:-5s;width:2px;height:2px}.embers i:nth-child(8){left:95%;animation-delay:-9s}
@keyframes ember-rise{0%{transform:translate(0,0);opacity:0}15%{opacity:.45}75%{opacity:.25}100%{transform:translate(25px,-105vh);opacity:0}}
@media(max-width:760px){.site-header{height:72px}.brand{font-size:16px;letter-spacing:2px}.intro{padding-top:36px}.intro h1{font-size:34px;letter-spacing:2px}.intro h1 span{display:block}.intro-copy{font-size:14px}.progress-panel{border-left:0}.ritual-layout{border-radius:9px}.ritual-panel{padding:23px}.eyebrow{letter-spacing:3px}}
@media(prefers-reduced-motion:reduce){.embers{display:none}}

.coin-edge{box-shadow:inset 0 0 0 1px #f5d98c80,inset 0 -2px 2px #51320c80}.coin-spark{box-shadow:0 0 6px #ffe6a6,0 0 14px #f0b33ba0}

/* Public guide and stable space for asynchronously calculated calendar data. */
.calendar-panel{min-height:100px}.calendar-copy{min-width:0}#calendar-term{min-height:1.7em}
.guide-page{max-width:900px;padding-bottom:48px}.guide-page .intro h1{font-size:clamp(28px,4vw,44px);letter-spacing:.08em}
.guide-nav{display:flex;flex-wrap:wrap;justify-content:center;gap:12px 24px;margin:0 0 40px}
.guide-page section{padding:28px 0;border-top:1px solid var(--border);scroll-margin-top:24px}
.guide-page h2{color:var(--bright);font-size:25px}.guide-page h3{font-size:20px;margin-top:28px}
.guide-page p,.guide-page li,.guide-page dd{line-height:2}.guide-page li+li{margin-top:8px}
.guide-page dt{color:var(--bright);font-weight:600;margin-top:20px}.guide-page dd{margin:8px 0 24px}
.guide-page caption{text-align:left;padding:0 0 16px}.guide-return{text-align:center;margin:28px 0}
.guide-return a{display:inline-block;text-decoration:none}.guide-page .table-wrap{margin-bottom:24px}
@media(max-width:760px){.guide-page{padding-inline:22px}.guide-page h2{font-size:22px}.guide-nav{justify-content:flex-start}.calendar-panel{min-height:112px}}
