/* 首页保持山水主视觉与历法图，出生表单样式由 home-form.css 补充。 */
:root[data-theme="cool"] {
    --home-accent: #1762bb;
    --home-ink: #102c50;
    --home-tech: #276fbe;
    --home-paper: #f9fbff;
    --home-art: url("/static/img/homepage-b-landscape.png?v=20260929-1");
}
:root[data-theme="warm"] {
    --home-accent: #f05a4e;
    --home-ink: #282321;
    --home-tech: #dd6554;
    --home-paper: #fffaf2;
    --home-art: url("/static/img/homepage-a-landscape.png?v=20260929-1");
}
body.home-page { background: #f4f6f8; background-image: none; color: var(--home-ink); }
body.home-page main { flex: 0 0 auto; width: 100%; max-width: none; margin: 0 auto; padding: 0; }
body.home-page .dev-sidebar, body.home-page .dev-sidebar-expand-btn { display: none !important; }
.home-header { z-index: 5; box-sizing: border-box; width: 100%; padding: 0 24px; border-bottom: 1px solid rgba(27, 48, 73, .08); background: rgba(255, 255, 255, .96); box-shadow: none; }
.home-nav-inner { display: grid; grid-template-columns: minmax(240px, 1fr) auto minmax(240px, 1fr); align-items: center; gap: 24px; width: min(100%, 1440px); min-height: 72px; margin: 0 auto; }
.home-brand { display: inline-flex; align-items: center; gap: 14px; color: var(--home-ink); text-decoration: none; }
.home-brand strong { font-family: var(--font-family-display); font-size: 27px; font-weight: 600; letter-spacing: .04em; }
.home-brand .brand-short { display: none; }
.home-brand strong span { padding: 0; border: 0; color: inherit; font-size: inherit; letter-spacing: inherit; }
.home-brand > span { padding-left: 14px; border-left: 1px solid rgba(16, 44, 80, .2); color: #63758a; font-size: 11px; letter-spacing: .08em; }
.home-nav-links { display: flex; align-items: center; gap: clamp(24px, 3vw, 44px); }
.home-nav-links a { color: #273b54; font-size: 13px; font-weight: 600; text-decoration: none; transition: color .18s ease; }
.home-nav-links a:hover { color: var(--home-accent); }
.home-nav-actions { display: flex; align-items: center; justify-content: flex-end; gap: 18px; }
.home-lang-switch { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border: 1px solid rgba(25, 53, 84, .1); border-radius: 999px; background: rgba(255,255,255,.72); }
.home-lang-switch .lang-btn { padding: 3px 5px; border: 0; background: transparent; color: #687b90; font: 500 10px var(--font-family-base); cursor: pointer; }
.home-lang-switch .lang-btn.active { color: var(--home-ink); font-weight: 700; }
.home-lang-switch .divider { display: none; }
.home-style-switch { display: flex; gap: 3px; padding: 3px; border: 1px solid rgba(25, 53, 84, .1); border-radius: 20px; background: #f0f3f7; }
.home-style-switch .theme-btn { display: grid; place-items: center; width: 29px; height: 27px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #607186; cursor: pointer; }
.home-style-switch .theme-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.home-style-switch .theme-btn.active { background: #173b67; color: #fff; box-shadow: 0 2px 6px rgba(16, 44, 80, .2); }
:root[data-theme="warm"] .home-style-switch .theme-btn.active { background: #c34f45; }
.home-login { min-width: 68px; height: 34px; padding: 0 17px; border: 0; border-radius: 20px; background: var(--home-accent); color: #fff; font: 600 12px var(--font-family-base); cursor: pointer; }
.home-user-info { align-items: center; gap: 8px; color: var(--home-ink); font-size: 12px; }
.home-user-info .role-badge, .home-user-info #userQuota { padding: 2px 7px; border-radius: 9px; background: rgba(30, 89, 151, .1); color: var(--home-accent); }
.home-user-info .user-dropdown a { color: var(--home-ink); text-decoration: none; }
.home-shell { width: min(calc(100% - (var(--site-stage-gutter) * 2)), var(--site-stage-max)); margin: 0 auto; }
.home-stage { position: relative; min-height: clamp(850px, calc(100dvh - 90px), 900px); overflow: hidden; isolation: isolate; border-radius: 0 0 13px 13px; background: var(--home-art) center 47% / cover no-repeat; }
.home-stage::before { position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, rgba(250, 252, 255, .32), rgba(250, 252, 255, .05) 48%, transparent 76%), linear-gradient(0deg, rgba(248, 250, 252, .08), transparent 28%); content: ""; }
:root[data-theme="warm"] .home-stage::before { background: linear-gradient(90deg, rgba(255, 250, 243, .3), rgba(255, 250, 243, .02) 52%, transparent 78%), linear-gradient(0deg, rgba(255, 251, 245, .09), transparent 30%); }
.home-copy { position: absolute; top: 7%; left: var(--home-content-inset); z-index: 2; width: min(43%, 600px); }
.hero-kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; color: var(--home-accent); font-size: 13px; letter-spacing: .12em; font-weight: 600; }
.hero-kicker span { width: 3px; height: 15px; background: var(--home-accent); }
.home-copy h1 { margin: 0; color: var(--home-ink); font-family: var(--font-family-display); font-size: clamp(48px, 5.4vw, 78px); font-weight: 600; letter-spacing: -.06em; line-height: 1.18; }
.home-copy h1 em { color: var(--home-accent); font-style: normal; }
.hero-subtitle { max-width: 430px; margin: 13px 0 0; color: #33465c; font-size: clamp(16px, 1.2vw, 18px); line-height: 1.75; }
body.home-page footer { width: min(calc(100% - (var(--site-stage-gutter) * 2)), var(--site-stage-max)); box-sizing: border-box; margin: 0 auto; padding: 12px 20px 16px; border-top: 1px solid rgba(32, 63, 96, .09); background: rgba(255, 255, 255, .95); color: #728094; }
body.home-page .home-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.home-footer .footer-brand { color: var(--home-ink); font-family: var(--font-family-display); font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.home-footer .footer-brand span { margin-left: 9px; color: #78889a; font-family: var(--font-family-base); font-size: 9px; font-weight: 400; }
.home-footer nav { display: flex; align-items: center; gap: 19px; }
.home-footer nav a { color: #728094; font-size: 9px; text-decoration: none; }
.home-footer nav a:hover { color: var(--home-accent); }
.home-footer small { color: #8390a0; font-size: 8px; white-space: nowrap; }

/* 小屏下改为纵向阅读，保持标题与图盘的阅读顺序。 */
@media (max-width: 1000px) {
    .home-nav-inner { grid-template-columns: minmax(0, 1fr) auto; }
    .home-brand > span { display: none; }
    .home-stage { min-height: max(850px, calc(100dvh - 90px)); }
    .home-copy { top: 7%; left: var(--home-content-inset); width: 43%; }
    .home-copy h1 { font-size: clamp(44px, 6vw, 62px); }
}
@media (max-width: 700px) {
    .home-header { padding: 0 14px; }
    .home-nav-inner { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; min-height: 62px; }
    .home-brand strong { font-size: 22px; }
    .home-brand .brand-full { display: none; }
    .home-brand .brand-short { display: inline; }
    .home-nav-links { grid-column: 1 / -1; grid-row: 2; flex-wrap: wrap; justify-content: center; gap: 6px 16px; }
    .home-nav-links a { font-size: 12px; }
    .home-nav-actions { gap: 5px; }
    .home-lang-switch { gap: 2px; padding: 3px 4px; }
    .home-lang-switch .lang-btn { padding: 3px 2px; font-size: 8px; }
    .home-login { min-width: 52px; height: 30px; padding: 0 11px; font-size: 11px; }
    .home-stage { display: flex; min-height: 0; flex-direction: column; gap: 16px; padding: 34px var(--home-content-inset) 28px; background-position: center top; }
    .home-stage::before { background: linear-gradient(180deg, rgba(255, 255, 255, .56), rgba(255, 255, 255, .05) 62%, rgba(255, 255, 255, .2)); }
    :root[data-theme="warm"] .home-stage::before { background: linear-gradient(180deg, rgba(255, 250, 243, .58), rgba(255, 250, 243, .05) 62%, rgba(255, 250, 243, .2)); }
    .home-copy, .calendar-visual { position: relative; inset: auto; width: 100%; max-width: none; }
    .home-copy { z-index: 2; }
    .hero-kicker { margin-bottom: 14px; font-size: 11px; }
    .home-copy h1 { font-size: clamp(40px, 10vw, 54px); }
    .hero-subtitle { margin-top: 16px; font-size: 16px; }
    body.home-page .home-footer { flex-wrap: wrap; justify-content: center; gap: 8px 14px; padding: 11px 8px 14px; }
    .home-footer .footer-brand { display: none; }
    .home-footer nav { gap: 12px; }
    .home-footer small { width: 100%; text-align: center; }
    body.home-page footer { width: calc(100% - 36px); margin-top: 0; }
}
@media (max-width: 390px) {
    .home-nav-inner { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
    .home-nav-links { gap: 6px 16px; }
    .home-nav-links a { font-size: 12px; }
    .home-style-switch .theme-btn { width: 25px; height: 25px; }
}
@media (prefers-reduced-motion: reduce) {
    .home-nav-links a, .home-style-switch .theme-btn { transition: none; }
}
