/* Shared appearance settings, loaded after page styles. */
.theme-toggle{order:6;flex-shrink:0;border:1px solid var(--line);border-radius:6px;background:var(--surface);color:var(--ink);padding:9px 12px;min-height:40px;font:inherit;font-size:14px;cursor:pointer;white-space:nowrap}
.theme-toggle:focus-visible{outline:2px solid var(--gold);outline-offset:3px}
.service-card[data-service-id] h3{font-size:28px;line-height:1.35;max-width:100%;margin-bottom:18px}
.service-card[data-service-id] p{font-size:15px;line-height:1.8}
footer{flex-wrap:wrap;gap:22px;padding-bottom:28px}
html[data-theme="light"]{color-scheme:light;--bg:#faf9f6;--surface:#fff;--line:#d7d9d1;--ink:#242b27;--muted:#5d665e;--gold:#80631d;--red:#a4362c}
html[data-theme="light"] body{background:var(--bg);color:var(--ink)}
html[data-theme="light"] :is(input,select,textarea){background:#fff;color:var(--ink);border-color:#a9b3a7}
html[data-theme="light"] :is(.workspace,#cast-result,.palace.center,.service-workspace,.account-panel,.subject-profile,.usage-panel,.zodiac-reading,.zodiac-rule){background:var(--surface)}
html[data-theme="light"] :is(.palace,.live-cell,.birth-summary,.qa-message.user){background:#eff3e9;border-color:#c8d0bd;color:var(--ink)}
html[data-theme="light"] .palace:hover{background:#e0e8d8}html[data-theme="light"] .palace.selected{background:#78352b;color:#fff}
html[data-theme="light"] .live-cell.chief{background:#fff0de;border-color:#b88242}
html[data-theme="light"] :is(.live-cell .cell-top,.detail-copy,.detail-definition,.cast-intro ol){color:var(--muted)}
html[data-theme="light"] :is(#qa-error,#qa-stale,#followup-error,.cast-actions p,.service-off){color:#a12c26}
html[data-theme="light"] :is(.service-on,.service-live-badge){color:#25613a}
html[data-theme="light"] .service-card[data-service-id]{background:linear-gradient(135deg,#f0f3e7,#e7efea);border-color:#bcc7b4}
html[data-theme="light"] .service-card[data-service-id="astrology"],html[data-theme="light"] .service-card[data-service-id="ziwei"]{background:linear-gradient(135deg,#e6edf8,#eef0fa)}
html[data-theme="light"] .service-card[data-service-id="tarot"],html[data-theme="light"] .service-card[data-service-id="liuren"]{background:linear-gradient(135deg,#f3e8f1,#eceaf6)}
html[data-theme="light"] .service-card[data-service-id] h3{color:#253329}html[data-theme="light"] .service-card[data-service-id] p{color:#526052}html[data-theme="light"] .service-card[data-service-id] b{color:#775b17}
html[data-theme="light"] .service-card.paused{opacity:1;filter:saturate(.25)}html[data-theme="light"] .service-card.paused b{color:#675c58}
html[data-theme="light"] .service-workspace[data-service="astrology"]{background:#eef2fa}
html[data-theme="light"] .zodiac-card:before{background:linear-gradient(90deg,rgba(255,255,255,.95),rgba(255,255,255,.55)),var(--zodiac-image);background-size:cover;background-position:center}
.footer-meta{display:flex;align-items:center;justify-content:flex-end;gap:16px;flex-wrap:wrap;margin-left:auto;color:var(--muted);font-size:12px}
.footer-meta .site-version{margin:0}.footer-copyright{white-space:nowrap}
@media(max-width:540px){.footer-meta{gap:6px 12px;font-size:11px}}

/* Shared footer directory, with the copyright and version on one baseline. */
footer.site-footer{display:block;padding:48px max(28px,calc((100% - 1240px)/2)) 24px;margin:36px 0 0;background:var(--surface);border-top:1px solid var(--line)}
footer.site-footer .footer-intro{text-align:center;margin-bottom:36px}
footer.site-footer .footer-intro .brand{display:inline-block;font-size:28px;letter-spacing:.12em;color:var(--ink)}
html body footer.site-footer .footer-intro p{display:block;margin:12px 0 0;font-size:14px;color:var(--muted);line-height:1.8}
footer.site-footer .footer-columns{position:static;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:40px;padding:0;margin:0;background:none;border:0;box-shadow:none;width:auto}
.footer-column h3{font-size:17px;font-weight:600;color:var(--ink);border-bottom:1px solid var(--line);padding-bottom:12px;margin:0 0 14px;letter-spacing:.04em}
.footer-column ul{list-style:none;margin:0;padding:0}.footer-column li{margin:0 0 8px}
footer.site-footer .footer-column a{display:inline-block;padding:4px 0;font-size:15px;line-height:1.6;color:var(--muted);text-decoration:none}
footer.site-footer .footer-column a:hover,footer.site-footer .footer-top:hover{color:var(--gold);text-decoration:underline}
footer.site-footer .footer-column a[aria-disabled="true"]{opacity:.55;cursor:not-allowed}
footer.site-footer .footer-meta{justify-content:center;gap:12px 22px;border-top:1px solid var(--line);padding-top:22px;margin:32px 0 0;font-size:12px}
footer.site-footer .footer-top{color:var(--muted);text-decoration:none}.site-footer .art-credit{display:block;text-align:center;margin-top:16px}
.site-footer a:focus-visible{outline:2px solid var(--gold);outline-offset:4px;border-radius:2px}
@media(max-width:760px){footer.site-footer{padding:32px 24px 22px}footer.site-footer .footer-columns{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}footer.site-footer .footer-meta{gap:10px 16px}.footer-column h3{font-size:16px}}
@media(max-width:380px){footer.site-footer .footer-columns{gap:18px}.footer-column h3{font-size:15px}footer.site-footer .footer-column a{font-size:14px}}

footer.site-footer .footer-meta{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:16px;width:100%;font-size:14px;line-height:1.6;padding:22px 0 0;margin:32px 0 0;text-align:left}footer.site-footer .footer-copyright{white-space:normal}footer.site-footer .site-version{text-align:center}footer.site-footer .footer-top{justify-self:end;padding:6px 0} @media(max-width:640px){footer.site-footer .footer-meta{grid-template-columns:1fr auto;gap:8px 16px}footer.site-footer .footer-copyright{grid-column:1/-1}footer.site-footer .site-version{text-align:left}footer.site-footer .footer-top{grid-column:2}}

#theme-toggle{display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px;min-width:42px;padding:0;border-radius:50%;line-height:1}#theme-toggle svg{display:block;pointer-events:none}

/* Shared compact navigation and consistent touch controls. */
body>header{min-height:72px;padding:12px 28px;gap:20px;flex-wrap:nowrap}
body>header>.edition,body>header>#topup-menu{display:none}
body>header>#site-nav{gap:20px;flex:1;min-width:0}
body>header .language-switcher{margin-left:auto;flex-shrink:0}
body>header #theme-toggle{flex-shrink:0;width:40px;height:40px;min-height:40px}
body>header #member-login{font-size:14px;min-height:40px;padding:8px 12px;margin-left:auto;white-space:nowrap}
body>header .brand{font-size:24px}
body>header .brand .seal{font-size:28px}
body>header .language-switcher select{min-height:40px;padding:8px;font-size:14px}
body>header #nav-toggle{min-height:40px}
main .service-hero{padding:24px 0 18px}
main .service-hero h1{margin:10px 0;font-size:clamp(30px,4vw,46px)}
main .service-workspace-head{min-height:0}
main .service-workspace{margin-block:20px}
@media(max-width:900px) and (min-width:761px){body>header{gap:12px;padding-inline:20px}body>header>#site-nav{gap:12px}body>header .brand small{display:none}}
@media(max-width:760px){
 body>header{min-height:64px;padding:10px 14px;gap:10px;flex-wrap:nowrap}
 body>header>.brand{margin-right:auto;font-size:20px;gap:8px}
 body>header .brand small{display:none}
 body>header .brand .seal{font-size:24px;padding:4px}
 body>header #nav-toggle{order:8;padding:8px;font-size:13px}
 body>header .language-switcher{margin:0;max-width:100px}
 body>header .language-switcher select{width:100%;font-size:14px;padding:7px 4px}
 body>header #theme-toggle{width:36px;height:40px;min-width:36px}
 body>header>#site-nav{top:100%;left:12px;right:12px;z-index:90;align-items:stretch;gap:6px}
 body>header #site-nav #member-login{margin:0;text-align:left}
 main .service-hero{padding:18px 0 12px}
 main .service-hero h1{font-size:30px}
 main .service-workspace{padding:18px 14px}
 main .service-controls-grid{gap:12px}
}

/* Give the brand, primary links and member tools distinct places. */
@media(min-width:761px){
 body>header{gap:28px;padding-inline:32px}
 body>header>#site-nav{gap:28px}
 body>header #site-nav>.nav-member{margin-left:auto}
 body>header #site-nav>.nav-member>summary{min-height:40px;padding:8px 4px}
 body>header .language-switcher{margin-left:0}
}
body>header .nav-member-panel a,body>header .nav-member>summary{text-decoration:none;border-bottom:0}
body>header .nav-member-panel{box-shadow:0 12px 32px #0003;border:1px solid var(--line);padding:8px}
body>header .nav-member-panel>a{min-height:42px}
.account-main{padding-top:28px}
.account-heading h1{font-size:38px;margin:8px 0}
.account-heading .eyebrow{margin:0}
.account-heading .lead{font-size:15px;margin:8px 0}
.usage-panel{padding:20px;margin:22px 0 32px}
.usage-panel .section-top{align-items:center;margin:0}
.usage-panel h2{font-size:22px;margin:0}
#usage-toggle{min-height:40px;padding:6px 10px;border:1px solid var(--line);border-radius:5px}
.usage-tools{display:flex;align-items:center;justify-content:space-between;margin:20px 0 10px;font-size:13px;color:var(--muted)}
.usage-card small{font-size:12px;color:var(--muted)}
/* An editorial directory: clear page title and compact illustrated cards. */
#services{margin:28px 0}
#services>.section-top{margin-bottom:20px}
#services .eyebrow{font-size:11px;letter-spacing:.2em;margin:0 0 8px}
#services h2{font-size:32px;line-height:1.35;margin:0;font-weight:500}
#services .service-grid{gap:14px;margin-top:0}
#services .service-card[data-service-id]{min-height:174px;padding:20px;border-radius:9px}
#services .service-card[data-service-id] h3{font-size:22px;line-height:1.4;margin:0 0 9px;font-weight:600;position:relative;z-index:1}
#services .service-card[data-service-id] p{font-size:13px;line-height:1.7;margin:0 0 14px;max-width:78%;min-height:44px}
#services .service-card[data-service-id] b{font-size:13px}
#services .service-card[data-service-id]:after{right:-18px;bottom:-10px;width:190px;height:190px;opacity:.32;transform:none;background-size:contain}
#services .service-card[data-service-id]:before{content:'';position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,var(--surface) 4%,transparent 100%);opacity:.4}
@media(max-width:760px){#services h2{font-size:28px}.account-main{padding-top:20px}.account-heading h1{font-size:30px}}
@media(max-width:560px){
 #services .service-grid{grid-template-columns:1fr;gap:10px}
 #services .service-card[data-service-id]{min-height:132px;padding:16px 18px}
 #services .service-card[data-service-id] h3{font-size:20px;margin-bottom:6px}
 #services .service-card[data-service-id] p{margin-bottom:8px;min-height:0;max-width:76%}
 #services .service-card[data-service-id]:after{width:150px;height:150px}
 .usage-panel{padding:16px}.usage-panel h2{font-size:20px}
}

@media(max-width:540px){.account-heading{position:relative;padding-right:52px}.account-heading>#account-logout{position:absolute;right:0;top:6px;min-height:40px}.account-sections{gap:6px}.account-sections a{font-size:13px;padding:8px 10px}}

/* Stable artwork layers; compact mobile directory shares the desktop line art. */
#services .service-card[data-service-id]{border-width:1px}
#services .service-card[data-service-id]:before{z-index:0;pointer-events:none}
#services .service-card[data-service-id]:after{z-index:0;pointer-events:none}
#services .service-card[data-service-id]>p,
#services .service-card[data-service-id]>b{position:relative;z-index:1}
@media(hover:none){
 #services .service-card[data-service-id]:hover{transform:none;border-color:var(--line)}
}
@media(max-width:640px){
 #services{margin:22px 0 30px}
 #services>.section-top{margin-bottom:18px}
 #services h2{font-size:26px;line-height:1.4;font-weight:500}
 #services .eyebrow{font-size:10px;letter-spacing:.19em}
 #services .service-grid{grid-template-columns:1fr;gap:10px}
 #services .service-card[data-service-id]{min-height:0;padding:16px 18px;border-radius:6px;border-color:var(--line);background:var(--surface);box-shadow:none;filter:none;opacity:1;transition:border-color .18s}
 #services .service-card[data-service-id] h3{font-size:19px;line-height:1.45;font-weight:500;letter-spacing:.04em;margin:0 0 7px;max-width:100%;color:var(--ink)}
 #services .service-card[data-service-id] p{font-size:13px;line-height:1.65;font-weight:400;min-height:0;max-width:calc(100% - 54px);margin:0 0 11px;color:var(--muted)}
 #services .service-card[data-service-id] b{font-size:12px;line-height:1.5;font-weight:500;color:var(--gold)}
 #services .service-card[data-service-id]:before{display:none}
 #services .service-card[data-service-id]:after{width:110px;height:110px;right:-12px;bottom:5px;opacity:.18;transform:none}
 #services .service-card.paused h3{color:var(--muted)}
 #services .service-card.paused b{color:var(--muted)}
}

@media(max-width:640px){html[data-theme="light"] #services .service-card[data-service-id]:after{opacity:.38;filter:brightness(.65)}}


header .language-switcher{position:relative;width:42px;height:42px;flex:0 0 42px;justify-content:center;border-radius:12px;background:var(--surface);color:var(--ink)}
header .language-switcher svg{width:25px;height:25px;pointer-events:none}
header .language-switcher select{position:absolute;inset:0;min-width:0;width:100%;height:100%;opacity:0;cursor:pointer}
header .language-switcher:focus-within{outline:2px solid var(--gold);outline-offset:3px}
header #theme-toggle{border:0;border-radius:12px;width:42px;height:42px;background:transparent}
header #site-nav .nav-subscription{white-space:nowrap}
header .nav-member-panel{left:auto;right:0;width:288px;border-radius:16px;padding:10px;box-shadow:0 16px 48px #0004}
.member-menu-identity{display:flex;flex-direction:column;gap:5px;padding:14px 12px 18px;margin-bottom:6px;border-bottom:1px solid var(--line);overflow-wrap:anywhere}
.member-menu-identity small,.member-menu-identity span{color:var(--muted);font-size:13px}
header .nav-member-panel>a{padding:13px 14px;border-radius:8px;font-size:15px}
header .nav-member-panel>.nav-member-logout{color:#d7857c;padding:14px}
body[data-member-authenticated="true"] header .nav-member>summary:before{content:attr(data-initial);display:grid;place-items:center;width:34px;height:34px;flex-shrink:0;border-radius:50%;background:var(--gold);color:#171b18;font-size:16px}
body:not([data-member-authenticated="true"]) header .nav-member>summary{background:var(--gold);color:#171b18;padding:9px 18px;border-radius:12px;font-weight:600}
footer.site-footer{display:grid;grid-template-columns:minmax(190px,1fr) minmax(420px,2fr) 140px;gap:40px;align-items:start;padding:56px 32px 24px}
footer.site-footer .footer-intro{text-align:left;margin:0;max-width:280px}
footer.site-footer .footer-columns{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:22px;margin:0}
footer.site-footer .footer-column h3{font-size:14px;border:0;margin:0 0 18px;padding:0;color:var(--muted)}
footer.site-footer .footer-column li{margin-bottom:12px;font-size:14px}
footer.site-footer .footer-meta{grid-column:1/-1;width:100%;margin-top:12px}
.footer-actions{display:flex;flex-direction:column;gap:22px;padding-top:2px;font-weight:600}
@media(max-width:1000px){footer.site-footer{grid-template-columns:1fr 2fr}.footer-actions{grid-column:1/-1;flex-direction:row;flex-wrap:wrap}header{gap:14px}header #site-nav{gap:14px}}
@media(max-width:760px){footer.site-footer{grid-template-columns:1fr;padding:36px 20px 20px;gap:28px}footer.site-footer .footer-columns{grid-template-columns:repeat(2,1fr);gap:24px}.footer-actions{grid-column:auto}header .nav-member-panel{position:static;width:100%}header .nav-member>summary{max-width:100%}}

header .language-switcher{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b5a478' stroke-width='1.6'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cellipse cx='12' cy='12' rx='4' ry='9'/%3E%3Cpath d='M3 12h18'/%3E%3C/svg%3E");background-position:center;background-repeat:no-repeat;background-size:25px}header .language-switcher svg{visibility:hidden}header .nav-member>summary.has-avatar:before{display:none}.member-avatar{width:34px;height:34px;object-fit:cover;border-radius:50%;flex-shrink:0}.member-avatar:not(:only-child){margin:0}

.footer-app-install{display:inline-flex;align-items:center;gap:12px;padding:12px 16px;margin-top:20px;border:1px solid var(--line);border-radius:12px;text-decoration:none;color:var(--ink)}.footer-app-install img{border-radius:10px}.footer-app-install span{display:flex;flex-direction:column;gap:3px}.footer-app-install small{font-size:12px;color:var(--muted)}.footer-app-install:hover{border-color:var(--gold)}

header .language-switcher{overflow:visible}header .language-switcher>svg{display:none}.language-trigger{position:absolute;inset:0;width:42px;height:42px;margin:0;padding:0;border:0!important;background:transparent!important;border-radius:12px;cursor:pointer}.language-panel{position:absolute;right:0;top:52px;z-index:150;width:204px;padding:10px;border:1px solid var(--line);border-radius:14px;background:var(--surface);box-shadow:0 16px 42px #0004}.language-panel[hidden]{display:none}.language-panel p{font-size:11px;color:var(--muted);margin:6px 10px 10px;letter-spacing:.04em}.language-panel button{display:block;width:100%;text-align:left;padding:11px 13px;border:0;border-radius:8px;background:transparent;color:var(--ink);font-size:15px;cursor:pointer}.language-panel button:hover,.language-panel button:focus-visible{background:color-mix(in srgb,var(--gold) 12%,transparent)}.language-panel button[aria-pressed=true]{color:var(--gold);background:color-mix(in srgb,var(--gold) 8%,transparent)}.language-panel button[aria-pressed=true]:after{content:'✓';float:right}.language-trigger:focus-visible{outline:2px solid var(--gold);outline-offset:3px}
body[data-member-authenticated="true"] header .nav-member>summary.has-avatar:before{content:none;display:none}
.member-avatar{display:none}summary.has-avatar>.member-avatar{display:block}
html[data-theme="light"] body:not([data-member-authenticated="true"]) header .nav-member>summary{background:#f5f3eb;color:#6b572d;border:1px solid #c9bd9c;box-shadow:0 1px 2px #51452d08;transition:background .2s,border-color .2s}
html[data-theme="light"] body:not([data-member-authenticated="true"]) header .nav-member>summary:hover{background:#eeeadd;border-color:#aa9768;color:#594820}
html[data-theme="light"] body:not([data-member-authenticated="true"]) header .nav-member>summary:focus-visible{outline:2px solid #8a7545;outline-offset:3px}
@media(max-width:760px){body>header{gap:6px}body>header>.nav-member>summary:after{display:none}}
@media(max-width:420px){body>header>.brand{font-size:0;gap:0}body>header>.brand .seal{font-size:24px}body>header{padding-inline:12px}}

/* Organic Yuan seal selected from the original lower-left identity. */
.brand.yg-brand{--yg-unit:54px;display:inline-grid;grid-template-columns:var(--yg-unit) calc(var(--yg-unit)*2.12);grid-template-rows:var(--yg-unit) auto;gap:7px 10px;align-items:center;line-height:1;text-decoration:none;flex-shrink:0}
.yg-seal{display:block;width:var(--yg-unit);height:var(--yg-unit);background:#bd2c24;mask:url('/assets/brand/yuan-organic-seal.png') center/118% 118% no-repeat;-webkit-mask:url('/assets/brand/yuan-organic-seal.png') center/118% 118% no-repeat}
.yg-type{filter:brightness(0) opacity(.82);display:block;width:calc(var(--yg-unit)*2.12);height:var(--yg-unit);background:url('/assets/brand/guanju-serif-source.png') no-repeat;background-size:calc(var(--yg-unit)*4.572) calc(var(--yg-unit)*2.286);background-position:calc(var(--yg-unit)*-1.946) calc(var(--yg-unit)*-.585)}
.yg-english{grid-column:1/-1;display:block;text-align:center;font-family:Georgia,'Times New Roman',serif;font-size:calc(var(--yg-unit)*.20);font-weight:600;letter-spacing:calc(var(--yg-unit)*.13);padding-left:calc(var(--yg-unit)*.13);color:#2d302e;white-space:nowrap}
html:not([data-theme="light"]) .yg-seal{background:#eedbb0}
html:not([data-theme="light"]) .yg-type{filter:brightness(0) invert(.94)}
html:not([data-theme="light"]) .yg-english{color:#f0eee7}
footer.site-footer .brand.yg-stacked{--yg-unit:68px;display:inline-grid;flex-direction:initial;gap:10px 12px}
@media(max-width:1100px){body>header>.brand.yg-brand{--yg-unit:46px;gap:6px 8px}}
@media(max-width:760px){body>header>.brand.yg-brand{--yg-unit:40px;gap:5px 7px}}
@media(max-width:420px){body>header>.brand.yg-brand{--yg-unit:34px;gap:5px 6px}}
@media(max-width:360px){body>header>.brand.yg-brand{--yg-unit:30px;gap:4px 5px}body>header{gap:4px;padding-inline:8px}}
