.lfc-page{--lfc-ink:#312638;--lfc-plum:#574060;--lfc-text:#4e4654;--lfc-line:#e7dce9;background:#fffaf6;color:var(--lfc-ink);line-height:1.68}
.lfc-page .lfc-wrap{width:min(1160px,calc(100% - 64px));margin-inline:auto}
.lfc-page .lfc-kicker,.lfc-page .eyebrow{color:#674378;text-transform:uppercase;letter-spacing:.08em;font-size:.84rem;font-weight:770}
.lfc-page h1,.lfc-page h2,.lfc-page h3{color:var(--lfc-ink);line-height:1.2;letter-spacing:-.02em;margin:.1em 0 .6em;text-wrap:balance}
.lfc-page h1{font-size:clamp(2.75rem,5.3vw,5.45rem);letter-spacing:-.045em}
.lfc-page h2{font-size:clamp(1.65rem,3.15vw,2.9rem)}
.lfc-page h3{font-size:clamp(1.08rem,1.35vw,1.37rem)}
.lfc-page p{margin:0 0 1rem;color:var(--lfc-text)}
.lfc-page [id]{scroll-margin-top:140px}
.lfc-page .lfc-hero{padding-block:clamp(38px,6vw,91px);background:
 radial-gradient(ellipse at 0% 0%,#633e67,transparent 60%),radial-gradient(ellipse at 100% 100%,#7b5045,transparent 60%),#26203a}
.lfc-page .lfc-hero h1,.lfc-page .lfc-hero .lfc-kicker{color:#fff8ef}
.lfc-page .lfc-hero p:not(.lfc-kicker){color:#faf0f5;max-width:45ch;font-size:clamp(1rem,1.6vw,1.18rem)}
.lfc-page .lfc-hero-grid{display:grid;grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr);gap:clamp(22px,5vw,74px);align-items:center}
.lfc-page .lfc-hero figure{margin:0;padding:4px;border-radius:23px;background:linear-gradient(132deg,#da9deb,#d79582 24%,#f5d77f 44%,#80bdad 65%,#a5a3ee 85%,#ecc2dc);box-shadow:0 22px 70px #130f26a6}
.lfc-page .lfc-hero img{display:block;width:100%;height:auto;aspect-ratio:3/2;object-fit:cover;border-radius:19px}
.lfc-page .lfc-actions{display:flex;gap:12px 18px;align-items:center;flex-wrap:wrap}
.lfc-page .lfc-button{display:inline-flex;align-items:center;min-height:45px;max-width:100%;padding:9px 17px;border-radius:999px;background:#573962;color:#fff;font-weight:750;text-decoration:none}
.lfc-page .lfc-button:hover{background:#382245}
.lfc-page .lfc-hero .lfc-button{background:#f9e6cd;color:#382245}
.lfc-page .lfc-hero .lfc-button:hover{background:#fff4e4}
.lfc-page .lfc-hero .lfc-anchor{color:#fff2f2;font-weight:720}
.lfc-page a:focus-visible,.lfc-page button:focus-visible,.lfc-page summary:focus-visible{outline:3px solid #a97bbb;outline-offset:4px}
.lfc-page .lfc-intro{max-width:62ch}
.lfc-page .lfc-tones,.lfc-page .lfc-summary{padding-block:clamp(39px,6vw,82px)}
.lfc-page .lfc-palette{margin:22px 0 0;padding:0;list-style:none;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
.lfc-page .lfc-palette li{min-width:0;padding:13px;border:1px solid #eadfe6;border-radius:17px;background:#fff}
.lfc-page .lfc-palette p{font-size:.92rem;margin:0}
.lfc-page .lfc-swatch{display:block;margin-bottom:13px;aspect-ratio:2.7;border-radius:9px;background:radial-gradient(ellipse at 30% 0%,#fff6e8af,transparent 65%),linear-gradient(125deg,#432b2e55,transparent 63%),var(--lfc-tone)}
.lfc-page .lfc-calc{padding-block:clamp(31px,6vw,77px);background:radial-gradient(ellipse at 0 0,#ebd9fc,transparent 60%),radial-gradient(ellipse at 100% 70%,#cce9dd,transparent 62%),#f7ebdf}
.lfc-page .lfc-form-shell{box-sizing:border-box;padding:clamp(19px,4.5vw,52px);border:1px solid #e7dce9;background:#fffdfaf5;border-radius:24px;box-shadow:0 17px 42px #49374f16}
.lfc-page .lfc-form-shell > p{max-width:68ch}
.lfc-page .lfc-form-shell .bazi-form{margin:16px 0;align-items:stretch;min-width:0}
.lfc-page .lfc-form-shell .bazi-form > *{min-width:0}
.lfc-page .lfc-form-shell .bazi-form input,.lfc-page .lfc-form-shell .bazi-form select{box-sizing:border-box;min-width:0;max-width:100%;width:100%}
.lfc-page .lfc-form-shell .formula-note,.lfc-page .lfc-form-shell .answer-box{overflow-wrap:anywhere}
.lfc-page .lfc-form-shell .bazi-pillars{grid-template-columns:repeat(4,minmax(0,1fr))}
.lfc-page .lfc-form-shell .bazi-pillars > *{overflow-wrap:anywhere;min-width:0}
.lfc-page .lfc-form-shell .stem-buttons{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:7px}
.lfc-page .lfc-form-shell .stem-buttons button{width:100%;min-width:0;padding-inline:3px}
.lfc-page .lfc-form-shell .learning-detail{margin-top:17px}
.lfc-page .lfc-form-shell .wuxing-legend{margin:15px 0}
.lfc-page .lfc-ending{padding:clamp(23px,5vw,57px);background:linear-gradient(132deg,#f2e8f7,#f6ecd9 56%,#e8f1e9);border:1px solid #eadfe7;border-radius:23px}
.lfc-page .lfc-ending p{max-width:64ch}
@media(max-width:900px){.lfc-page .lfc-palette{grid-template-columns:repeat(3,minmax(0,1fr))}.lfc-page .lfc-form-shell .stem-buttons{grid-template-columns:repeat(5,minmax(0,1fr))}}
@media(max-width:720px){.lfc-page .lfc-wrap{width:calc(100% - 32px)}.lfc-page .lfc-hero-grid{grid-template-columns:minmax(0,1fr);gap:21px}.lfc-page .lfc-hero{padding-top:35px}.lfc-page .lfc-palette{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.lfc-page .lfc-palette li{padding:10px}.lfc-page [id]{scroll-margin-top:100px}}
@media(max-width:430px){.lfc-page .lfc-form-shell .bazi-form{grid-template-columns:minmax(0,1fr)}.lfc-page .lfc-form-shell .bazi-pillars{grid-template-columns:repeat(2,minmax(0,1fr))}}
.lfc-culture{padding-block:clamp(1.75rem,5vw,4.25rem);display:grid;grid-template-columns:minmax(0,1.28fr) minmax(0,.82fr);gap:clamp(1.5rem,5vw,4rem);align-items:center}.lfc-culture-note p:not(.lfc-kicker){max-width:65ch}.lfc-culture-source{font-size:.9rem;color:#516059}.lfc-culture-quote{padding:clamp(1.25rem,4vw,2.45rem);border-radius:22px;color:#34283d;background:linear-gradient(130deg,#f4e8de 0%,#efe4f6 57%,#deeae3 100%);border:1px solid #dfd3dc}.lfc-page .lfc-culture-quote p{color:#38243f;font-size:clamp(1.35rem,3vw,2.24rem);font-weight:760;line-height:1.38;letter-spacing:-.015em;margin:0 0 .65rem;text-wrap:pretty}.lfc-culture-quote small{font-size:.9rem;color:#514358}@media(max-width:720px){.lfc-culture{grid-template-columns:1fr}}
/* Almanac framing: keep every functional control and use print-inspired hierarchy. */
.lfc-page .lfc-calc{background:linear-gradient(147deg,#382139,#4c2f4d 57%,#294139);color:#392a40}.lfc-page .lfc-form-shell{position:relative;background:#fff9ef;border:1px solid #b49b72;box-shadow:0 24px 70px #140f1e70;isolation:isolate}.lfc-page .lfc-form-shell::before{content:"";position:absolute;pointer-events:none;inset:7px;border:1px solid #d7c29e;border-radius:17px;z-index:-1}.lfc-page .lfc-form-shell h2,.lfc-page .lfc-stem-heading h3,.lfc-page #colour-day-master,.lfc-page .stem-buttons b,.lfc-page .bazi-symbol b,.lfc-page .lfc-culture-quote p,.lfc-page .lfc-consult h2{font-family:"Noto Serif HK","Songti TC",Georgia,serif}.lfc-page .lfc-form-shell h2{font-size:clamp(1.65rem,4vw,3.2rem);max-width:21ch}.lfc-page .lfc-form-shell .eyebrow{display:inline-block;letter-spacing:.12em;margin-top:.9rem}.lfc-almanac-mark{position:absolute;right:clamp(17px,4vw,48px);top:clamp(18px,4vw,47px);display:grid;place-items:center;width:clamp(36px,7vw,74px);aspect-ratio:1;border:1px solid #9b675e;box-shadow:inset 0 0 0 3px #fff9ef,inset 0 0 0 4px #b78479;border-radius:.5rem;color:#84473f;font-family:"Noto Serif HK","Songti TC",Georgia,serif;font-weight:750;font-size:clamp(.65rem,2vw,1.15rem);letter-spacing:.06em}.lfc-page .lfc-form-shell .bazi-form{padding:clamp(.9rem,3vw,1.65rem);border:1px solid #dbcaaf;border-radius:15px;background:#f7ebdc;gap:.8rem}.lfc-page .lfc-form-shell .bazi-form label{font-size:.94rem;color:#443048;font-weight:740}.lfc-page .lfc-form-shell .bazi-form input,.lfc-page .lfc-form-shell .bazi-form select{font:inherit;color:#322139;border:1px solid #9c829c;background:#fffdf8;border-radius:.6rem;min-height:44px}.lfc-page .lfc-form-shell .formula-note{font-size:.94rem;line-height:1.65;color:#4e4152;text-wrap:pretty;overflow-wrap:break-word}.lfc-page .lfc-form-shell .bazi-form .formula-note{grid-column:1/-1}.lfc-page #colour-bazi-result{padding:clamp(.85rem,3vw,1.6rem);border:1px solid #c6a879;background:#fffdf8;border-radius:18px;margin:1.1rem 0 2rem}.lfc-page #colour-day-master{padding:.55rem .85rem;background:#ead0b2;border-radius:.6rem;color:#392644;width:fit-content;max-width:100%;font-size:clamp(1.05rem,2vw,1.55rem)}.lfc-page .bazi-pillars>div{border:1px solid #d0b88e;border-radius:12px;background:#f7ebd7;color:#392644}.lfc-page .bazi-pillars>div>span{font-size:.93rem;font-weight:770;letter-spacing:.1em;color:#62455f}.lfc-page .bazi-symbol b,.lfc-page .stem-buttons b{line-height:1.25;font-size:clamp(1.25rem,2.8vw,1.85rem)}.lfc-page .stem-buttons button{border:1px solid #c6ad8e;border-radius:.7rem;min-height:59px;transition:transform .19s;line-height:1.35}.lfc-page .stem-buttons button[aria-pressed=true]{outline:2px solid #643a71;outline-offset:2px}.lfc-page .stem-buttons button:hover{transform:translateY(-2px)}.lfc-stem-heading{padding-top:1.4rem;border-top:1px solid #ccb68b;margin-top:1.6rem}.lfc-page #colour-stem-advice{border-inline-start:3px solid #966f9f;padding:1rem;background:#f4e9f4;color:#3c2a40}.lfc-page .learning-detail{border:1px solid #d7c29e;border-radius:.75rem;padding:.8rem;background:#fffdf8}.lfc-page .learning-detail summary{font-weight:750;cursor:pointer}.lfc-page .lfc-ending.lfc-consult{display:grid;grid-template-columns:minmax(140px,.55fr) minmax(0,1.45fr);align-items:center;gap:clamp(1rem,4vw,3rem);background:linear-gradient(115deg,#f4e8e1,#f6eafa 60%,#e8f0e5);text-align:left}.lfc-page .lfc-consult figure{margin:0}.lfc-page .lfc-consult img{display:block;max-width:100%;width:100%;height:auto;aspect-ratio:4/5;object-fit:contain;border-radius:14px;background:#f6eee6}.lfc-page .lfc-consult figcaption,.lfc-page .lfc-consult-note{font-size:.92rem;font-weight:680;color:#54455f;margin-top:.55rem}.lfc-page .lfc-consult-back{color:#53375f;font-weight:700;text-underline-offset:.18em}
@media(max-width:630px){.lfc-page .lfc-ending.lfc-consult{grid-template-columns:1fr}.lfc-page .lfc-consult figure{max-width:200px}.lfc-page .lfc-form-shell .eyebrow{padding-inline-end:2.7rem}.lfc-page .lfc-form-shell .stem-buttons{gap:5px}.lfc-page .stem-buttons button{min-height:54px}}@media(prefers-reduced-motion:reduce){.lfc-page .stem-buttons button{transition:none}.lfc-page .stem-buttons button:hover{transform:none}}

/* Keep native iOS controls and every result inside the same almanac grid. */
.lfc-page .lfc-form-shell,.lfc-page .lfc-form-shell :is(form, label, input, select, button, #colour-bazi-result, .actions, .bazi-pillars, .bazi-symbols, .bazi-symbol, .stem-buttons, .learning-detail, .answer-box) {box-sizing:border-box; min-inline-size:0; max-inline-size:100%}
.lfc-page .lfc-form-shell .bazi-form label{grid-template-columns:minmax(0,1fr)}
.lfc-page .lfc-form-shell .bazi-form :is(input,select){display:block;inline-size:100%}
.lfc-page .lfc-form-shell input::-webkit-date-and-time-value{text-align:start;min-width:0}
.lfc-page .lfc-form-shell :is(button,.cta,.source){white-space:normal;overflow-wrap:anywhere}
.lfc-page .lfc-form-shell .actions > *{min-inline-size:0;max-inline-size:100%;box-sizing:border-box}
.lfc-page .lfc-form-shell .stem-buttons button{place-items:center;align-content:center}
.lfc-page .lfc-form-shell .stem-buttons button small{max-inline-size:100%;overflow-wrap:anywhere}
@media(max-width:630px){
 .lfc-page .lfc-form-shell{padding:clamp(13px,4.15vw,24px)}
 .lfc-page .lfc-form-shell .bazi-form{grid-template-columns:minmax(0,1fr);padding:clamp(10px,3.4vw,20px)}
 .lfc-page .lfc-form-shell .bazi-form :is(input,select){font-size:1rem}
 .lfc-page .lfc-form-shell #colour-bazi-result .actions>*{flex:1 1 100%;text-align:center;justify-content:center}
}
