/* 首页仪表盘（星垣术苑）— 与 landing.css 变量兼容，类名 hd- 前缀避免冲突 */
@import url('./css/hide-scrollbars.css?v=20260831-app-perf');

:root {
    --hd-page: #f7f3e9;
    --hd-card: #fffefb;
    --hd-ink: #2a2418;
    --hd-muted: #6b6154;
    --hd-line: rgba(120, 108, 92, 0.18);
    --hd-gold: #e8b86a;
    --hd-gold-deep: #c4923e;
    --hd-radius: 14px;
    --hd-shadow: 0 8px 28px rgba(42, 30, 18, 0.06);
    /* 命书弹层：与页面统一的浅描边 */
    --hd-lifebook-border: rgb(249, 243, 232);
    --hd-font-sans: 'Microsoft YaHei', 'PingFang SC', system-ui, sans-serif;
    --hd-font-display: 'Ma Shan Zheng', 'STKaiti', 'KaiTi', serif;
    --hd-font-serif: 'Noto Serif SC', 'Songti SC', 'STSong', 'SimSun', serif;
}

.hd-body {
    min-height: 100vh;
    margin: 0;
    font-family: var(--hd-font-sans);
    color: var(--hd-ink);
    background: var(--hd-page);
}

.hd-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(120% 80% at 50% -10%, rgba(248, 208, 142, 0.22), transparent 55%);
    z-index: 0;
}

.hd-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("/images/texture-paper-grain.svg");
    background-size: 240px 240px;
    opacity: 0.42;
    pointer-events: none;
}

.hd-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem clamp(0.75rem, 3vw, 1.5rem);
    background: color-mix(in srgb, var(--hd-page) 88%, white 12%);
    border-bottom: 1px solid var(--hd-line);
    backdrop-filter: blur(8px);
}

.hd-topbar-start {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.hd-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 2.35rem;
    height: 2.35rem;
    padding: 0;
    border-radius: 10px;
    border: 1px solid var(--hd-line);
    background: rgba(255, 255, 255, 0.65);
    color: #4a4034;
    cursor: pointer;
}

.hd-menu-toggle:hover {
    background: rgba(255, 252, 247, 0.95);
    border-color: rgba(196, 146, 62, 0.4);
}

.hd-menu-toggle__bars {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 1.05rem;
}

.hd-menu-toggle__bars span {
    display: block;
    height: 2px;
    width: 100%;
    border-radius: 999px;
    background: #4a4034;
}

body.hd-side-drawer-open .hd-menu-toggle {
    background: rgba(232, 184, 106, 0.22);
    border-color: rgba(196, 146, 62, 0.5);
}

.hd-side-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(42, 36, 24, 0.38);
    backdrop-filter: blur(2px);
}

.hd-side-drawer-backdrop[hidden] {
    display: none !important;
}

.hd-side-drawer {
    --hd-drawer-cream: #f8f2e6;
    --hd-drawer-cream-deep: #f0e6d4;
    --hd-drawer-ink: #3d3428;
    --hd-drawer-muted: #7a6d5a;
    --hd-drawer-gold: #c4923e;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 45;
    width: min(18.5rem, 82vw);
    height: 100%;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(120% 60% at 0% 0%, rgba(248, 220, 170, 0.35), transparent 55%),
        linear-gradient(180deg, #fbf6ec 0%, var(--hd-drawer-cream) 42%, var(--hd-drawer-cream-deep) 100%);
    border-right: 1px solid rgba(180, 150, 100, 0.22);
    box-shadow: 10px 0 32px rgba(60, 42, 20, 0.14);
    padding: calc(0.75rem + env(safe-area-inset-top)) 0 calc(1rem + env(safe-area-inset-bottom));
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    pointer-events: none;
}

.hd-side-drawer[hidden] {
    display: flex !important;
}

.hd-side-drawer.is-open {
    transform: translateX(0);
    pointer-events: auto;
}

.hd-side-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.45rem 1rem 0.95rem;
    border-bottom: 1px solid rgba(180, 150, 100, 0.2);
}

.hd-side-drawer__title {
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--hd-drawer-ink);
}

.hd-side-drawer__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid rgba(180, 150, 100, 0.28);
    border-radius: 999px;
    background: rgba(255, 252, 246, 0.85);
    color: var(--hd-drawer-muted);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

.hd-side-drawer__close:hover {
    background: rgba(232, 184, 106, 0.22);
    color: var(--hd-drawer-ink);
}

.hd-side-drawer__nav {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 1rem 0.85rem;
}

.hd-side-drawer__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    text-align: left;
    padding: 0.82rem 0.9rem;
    border-radius: 14px;
    border: 1px solid rgba(180, 150, 100, 0.22);
    background: linear-gradient(180deg, #fffdf8 0%, #f7efe2 100%);
    color: var(--hd-drawer-ink);
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(70, 50, 24, 0.04);
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.hd-side-drawer__item:hover,
.hd-side-drawer__item:active {
    background: linear-gradient(180deg, #fff8ea 0%, #f3e4cc 100%);
    border-color: rgba(196, 146, 62, 0.45);
    transform: translateX(2px);
}

.hd-side-drawer__ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 11px;
    border: 1px solid rgba(180, 150, 100, 0.24);
    background: rgba(255, 250, 240, 0.95);
    color: #8a6a3a;
}

.hd-side-drawer__ico svg,
.hd-side-drawer__ico img {
    display: block;
    width: 1.15rem;
    height: 1.15rem;
}

.hd-side-drawer__ico--archive {
    color: #6b4e2d;
    background: rgba(232, 184, 106, 0.18);
}

.hd-side-drawer__ico--fortune {
    background: rgba(232, 184, 106, 0.2);
}

.hd-side-drawer__ico--exam {
    color: #7a5a8a;
    background: rgba(196, 170, 210, 0.22);
}

.hd-side-drawer__ico--ask {
    color: #6b4a1e;
    background: rgba(255, 248, 230, 0.92);
    border-color: rgba(180, 120, 40, 0.35);
}

.hd-side-drawer__item--ask {
    border-color: rgba(180, 120, 40, 0.55);
    background: linear-gradient(165deg, #f3d7a0 0%, #e8b86a 55%, #dfaa58 100%);
    color: #2a2018;
    box-shadow: 0 4px 16px rgba(180, 120, 40, 0.22);
}

.hd-side-drawer__item--ask:hover,
.hd-side-drawer__item--ask:active {
    background: linear-gradient(165deg, #f6dfb0 0%, #ecbf78 55%, #e3b060 100%);
    border-color: rgba(160, 100, 30, 0.65);
    transform: translateX(2px);
}

.hd-side-drawer__item--ask .hd-side-drawer__label-main {
    font-weight: 800;
}

.hd-side-drawer__item--ask .hd-side-drawer__label-sub {
    display: block;
    margin-top: 0.12rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: rgba(58, 40, 18, 0.72);
}

.hd-side-drawer__item--me {
    display: none;
}

.hd-side-drawer__ico--me-security {
    color: #5a6a8a;
    background: rgba(140, 160, 200, 0.22);
}

@media (max-width: 991px) {
    .hd-side-drawer__item--me {
        display: flex;
    }
}

.hd-side-drawer__label {
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.25;
}

.hd-side-drawer__label-main {
    display: block;
}

.hd-side-drawer__label-sub {
    display: none;
}

/* 电脑端首页：与手机端一致保留左上角「三」导航 */
@media (min-width: 992px) {
    body.hd-home-page .hd-menu-toggle {
        display: inline-flex !important;
    }
}

body.hd-side-drawer-open {
    overflow: hidden;
}

.hd-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    text-decoration: none;
    color: inherit;
}

.hd-brand img {
    width: 48px;
    height: 48px;
    display: block;
    border-radius: 10px;
    object-fit: cover;
}

.hd-brand-cn {
    font-family: var(--font-brand-calligraphy, 'Ma Shan Zheng', 'KaiTi', serif);
    font-size: 1.35rem;
    letter-spacing: 0.06em;
    display: block;
    line-height: 1.1;
}

.hd-brand-sub {
    font-size: 0.68rem;
    color: var(--hd-muted);
    letter-spacing: 0.12em;
}

.hd-topnav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem 0.5rem;
    font-size: 0.82rem;
}

.hd-auth-label {
    color: var(--hd-muted);
    margin-right: 0.25rem;
    max-width: 10rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hd-auth-user {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-right: 0.35rem;
    max-width: 12rem;
}

.hd-auth-user__avatar {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 999px;
    overflow: hidden;
    flex: 0 0 auto;
    background: rgba(232, 184, 106, 0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hd-auth-user__avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hd-auth-user__avatar-fallback {
    font-size: 0.82rem;
    font-weight: 600;
    color: #8a6a3a;
    line-height: 1;
}

.hd-auth-user .hd-auth-label {
    color: var(--hd-ink);
    font-weight: 600;
}

.hd-topnav a,
.hd-nav-btn {
    text-decoration: none;
    color: #4a4034;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    border: 1px solid transparent;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.hd-topnav-link {
    font-family: var(--hd-font-serif);
    font-size: 0.86rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    color: #5a4a38;
}

.hd-topnav a:hover,
.hd-nav-btn:hover:not(:disabled) {
    border-color: var(--hd-line);
    background: rgba(255, 255, 255, 0.55);
}

.hd-nav-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.hd-topnav .hd-btn-primary {
    background: linear-gradient(180deg, #f4d49a, #e8b86a);
    border-color: rgba(196, 146, 62, 0.55);
    font-weight: 700;
    color: #3a2f1f;
}

.hd-main {
    position: relative;
    z-index: 1;
    max-width: 1180px;
    margin: 0 auto;
    padding: 1rem clamp(0.75rem, 2.5vw, 1.25rem) 2.5rem;
}

.hd-hero {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: clamp(1.1rem, 2.4vw, 1.75rem);
    margin-bottom: 1.25rem;
}

.hd-badge {
    font-size: 0.78rem;
    color: var(--hd-muted);
    margin: 0 0 0.35rem;
}

.hd-hero h1 {
    margin: 0 0 0.45rem;
    font-size: clamp(1.55rem, 3.6vw, 2.05rem);
    font-weight: 800;
    letter-spacing: 0.04em;
}

.hd-lead {
    margin: 0 0 0.85rem;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--hd-muted);
    max-width: 34rem;
}

.hd-hero-cta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.55rem;
    margin-bottom: 1rem;
}

.hd-hero-cta-row .hd-cta {
    flex: 1 1 9rem;
    min-width: 0;
    margin-bottom: 0;
    text-align: center;
}

/* .hd-cta 的 display 会覆盖原生 [hidden]，须显式强制隐藏 */
[hidden] {
    display: none !important;
}

.hd-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.15rem;
    border-radius: var(--btn-radius, 10px);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    color: #3a2f1f;
    background: linear-gradient(180deg, #f4d49a, #e8b86a);
    border: 1px solid rgba(196, 146, 62, 0.55);
    box-shadow: 0 4px 14px rgba(201, 160, 106, 0.28);
    margin-bottom: 1rem;
}

button.hd-cta {
    border: 1px solid rgba(196, 146, 62, 0.55);
    cursor: pointer;
    font: inherit;
}

.hd-cta--small {
    padding: 0.38rem 0.85rem;
    font-size: 0.82rem;
    margin-bottom: 0.5rem;
}

.hd-lifebook-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.55rem;
    margin: 0 0 0.45rem;
}

.hd-lifebook-actions--after-gauges {
    margin: 0.65rem 0 0.15rem;
}

.hd-lifebook-actions .hd-cta--small {
    margin-bottom: 0;
}

.hd-cta-label--short {
    display: none;
}

.hd-cta--outline {
    background: transparent;
    color: var(--hd-gold-deep, #a67c2d);
    border: 1px solid rgba(166, 124, 45, 0.55);
    box-shadow: none;
}

.hd-cta--outline:hover {
    background: rgba(232, 200, 140, 0.18);
    border-color: rgba(166, 124, 45, 0.85);
}

.hd-dash-card {
    background: color-mix(in srgb, var(--hd-card) 58%, #ffffff 42%);
    border-radius: var(--hd-radius);
    border: 1px solid color-mix(in srgb, var(--hd-gold) 38%, var(--hd-line));
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--hd-gold) 42%, transparent),
        0 10px 30px rgba(42, 30, 18, 0.055);
    padding: 1rem 1.05rem 1.1rem;
}

.hd-subsec {
    margin: 0.65rem 0 0.4rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: #4a4034;
}

.hd-subsec--tight {
    margin-top: 0.85rem;
}

.hd-mood-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    margin-top: 0.85rem;
}

.hd-mood-head .hd-subsec--mood {
    margin: 0;
}

.hd-mood-archive-btn {
    flex: 0 0 auto;
    margin: 0;
    white-space: nowrap;
}

.hd-subsec--watch {
    margin-top: 0;
}

.hd-watch-head {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: 0.35rem;
}

.hd-watch-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.hd-watch-calendar-wrap {
    position: relative;
    flex: 1 1 12rem;
    min-width: 0;
}

.hd-watch-calendar-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    width: 100%;
    border: 1px solid rgba(120, 108, 92, 0.22);
    border-radius: 10px;
    background: rgba(255, 252, 245, 0.95);
    padding: 0.42rem 0.55rem;
    font-size: 0.76rem;
    font-weight: 600;
    color: #3d352c;
    cursor: pointer;
}

.hd-watch-calendar-chevron {
    font-size: 0.72rem;
    opacity: 0.72;
}

.hd-watch-calendar-panel {
    position: absolute;
    z-index: 40;
    top: calc(100% + 0.25rem);
    left: 0;
    right: 0;
    min-width: 16.5rem;
    border-radius: 12px;
    border: 1px solid rgba(120, 108, 92, 0.2);
    background: #fffdf8;
    box-shadow: 0 10px 28px rgba(48, 38, 24, 0.14);
    padding: 0.55rem 0.5rem 0.65rem;
}

.hd-watch-calendar-panel[hidden] {
    display: none !important;
}

.hd-watch-cal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    margin-bottom: 0.4rem;
}

.hd-watch-cal-month {
    font-size: 0.8rem;
    font-weight: 700;
    color: #3d352c;
}

.hd-watch-cal-nav {
    border: none;
    background: rgba(232, 200, 140, 0.2);
    color: #5a4f42;
    border-radius: 8px;
    width: 1.85rem;
    height: 1.85rem;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

.hd-watch-cal-weekdays,
.hd-watch-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.2rem;
}

.hd-watch-cal-weekdays {
    margin-bottom: 0.25rem;
    font-size: 0.62rem;
    color: #8a8074;
    text-align: center;
}

.hd-watch-cal-day {
    border: none;
    background: transparent;
    border-radius: 8px;
    min-height: 1.85rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #4a4034;
    cursor: pointer;
}

.hd-watch-cal-day:hover {
    background: rgba(232, 200, 140, 0.22);
}

.hd-watch-cal-day--muted {
    color: #b0a89c;
    font-weight: 500;
}

.hd-watch-cal-day--today {
    box-shadow: inset 0 0 0 1px rgba(166, 124, 45, 0.55);
}

.hd-watch-cal-day--selected {
    background: rgba(232, 184, 106, 0.38);
    color: #2b2215;
}

.hd-watch-now-btn {
    flex: 0 0 auto;
    border: 1px solid rgba(166, 124, 45, 0.45);
    border-radius: 10px;
    background: rgba(255, 250, 242, 0.95);
    padding: 0.42rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #6b4f1f;
    cursor: pointer;
    white-space: nowrap;
}

.hd-watch-now-btn--hidden {
    opacity: 0.55;
}

.hd-watch-pillar-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.45rem;
    margin-top: 0.25rem;
}

@media (max-width: 520px) {
    .hd-watch-pillar-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.hd-watch-pillar-nav-col {
    display: flex;
    justify-content: center;
    gap: 0.35rem;
}

.hd-watch-nav-btn {
    border: 1px solid rgba(120, 108, 92, 0.18);
    background: rgba(255, 252, 245, 0.92);
    color: #5a5248;
    border-radius: 8px;
    width: 2rem;
    height: 1.65rem;
    font-size: 0.68rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.hd-watch-nav-btn:hover {
    background: rgba(232, 200, 140, 0.24);
}

.hd-pillar-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.45rem;
}

@media (max-width: 520px) {
    .hd-pillar-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.hd-pillar {
    border-radius: 10px;
    border: 1px solid rgba(120, 108, 92, 0.16);
    background: rgba(255, 250, 242, 0.9);
    padding: 0.45rem 0.35rem 0.5rem;
    text-align: center;
}

.hd-pillar--hour {
    border-color: rgba(232, 184, 106, 0.75);
    box-shadow: 0 0 0 1px rgba(232, 184, 106, 0.25) inset;
    background: linear-gradient(180deg, #fffdf8, #fff0dc);
}

.hd-pillar-k {
    display: block;
    font-size: 0.68rem;
    color: var(--hd-muted);
    margin-bottom: 0.15rem;
}

.hd-pillar-v {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.06em;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    flex-wrap: nowrap;
}

/* 与 style.css 排盘四柱 wx-* 五色一致（首页未引入 style.css） */
.hd-pillar .wx-木 {
    color: #00a870;
}
.hd-pillar .wx-火 {
    color: #e05a5a;
}
.hd-pillar .wx-土 {
    color: #c69035;
}
.hd-pillar .wx-金 {
    /* 浅色卡片：银灰/灰白，不用 text-shadow（易糊、发脏） */
    color: #9a9690;
    font-weight: 800;
    text-shadow: none;
}

.hd-pillar--hour .wx-金 {
    color: #9a9690;
}
.hd-pillar .wx-水 {
    color: #2d9ecf;
}

.hd-placeholder {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    background: rgba(120, 108, 92, 0.06);
    color: var(--hd-muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

.hd-placeholder--guide {
    background: rgba(232, 184, 106, 0.14);
    border: 1px solid rgba(196, 146, 62, 0.28);
    color: #4a3d2c;
}

.hd-guide-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
    width: 100%;
}

.hd-guide-line {
    margin: 0;
    line-height: 1.55;
}

.hd-guide-label {
    display: inline-block;
    margin-right: 0.35rem;
    padding: 0.08rem 0.42rem;
    border-radius: 6px;
    background: rgba(196, 146, 62, 0.22);
    color: #5c4528;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.hd-guide-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: linear-gradient(180deg, #f4d49a, #e8b86a);
    color: #3a2f1f;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(180, 130, 70, 0.22);
}

.hd-guide-login:hover {
    filter: brightness(1.03);
}

.hd-gauges-placeholder--guide {
    background: rgba(232, 184, 106, 0.1);
    border: 1px dashed rgba(196, 146, 62, 0.35);
    border-radius: 10px;
    padding: 0.55rem 0.65rem;
}

.hd-placeholder svg {
    flex-shrink: 0;
    opacity: 0.55;
}

.hd-gauges {
    display: block;
    margin-top: 0.15rem;
}

.hd-gauges-footnote {
    flex: 1 1 100%;
    margin: 0.2rem 0 0;
    font-size: 0.76rem;
    line-height: 1.55;
    color: var(--hd-muted);
}

.hd-gauges-placeholder {
    margin: 0.35rem 0 0;
    font-size: 0.78rem;
    line-height: 1.52;
    color: var(--hd-muted);
    flex: 1 1 100%;
}

.hd-gauges-placeholder--loading {
    opacity: 0.88;
}

.hd-gauges-placeholder--warn {
    color: #9a4a32;
}

/* 当月心情：左综合分 + 右竖条 */
.hd-mood {
    display: flex;
    align-items: stretch;
    gap: 0.85rem 1rem;
    padding: 0.55rem 0.15rem 0.2rem;
    min-height: 9.5rem;
}

.hd-mood-left {
    flex: 0 1 38%;
    min-width: 6.8rem;
    max-width: 11rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.hd-mood-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--hd-ink);
    letter-spacing: 0.02em;
    margin-bottom: 0.15rem;
}

.hd-mood-score {
    display: flex;
    align-items: baseline;
    gap: 0.12rem;
    line-height: 1;
    margin: 0.1rem 0 0.45rem;
}

.hd-mood-num {
    font-family: 'Ma Shan Zheng', 'Songti SC', 'STSong', serif;
    font-size: 2.65rem;
    font-weight: 400;
    font-style: italic;
    color: var(--hd-ink);
    position: relative;
    display: inline-block;
    line-height: 1;
}

.hd-mood-num::after {
    content: '';
    position: absolute;
    left: 0.05em;
    right: 0.05em;
    bottom: 0.08em;
    height: 0.28em;
    background: linear-gradient(
        90deg,
        rgba(232, 184, 106, 0.55),
        rgba(196, 146, 62, 0.35) 55%,
        rgba(232, 184, 106, 0.2)
    );
    border-radius: 40% 60% 50% 50%;
    z-index: -1;
    transform: skewX(-8deg);
}

.hd-mood-unit {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--hd-muted);
    margin-left: 0.05rem;
}

.hd-mood-blurb {
    margin: 0;
    font-size: 0.72rem;
    line-height: 1.55;
    color: var(--hd-muted);
}

.hd-mood-bars {
    flex: 1 1 auto;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.2rem;
    min-width: 0;
    padding-top: 0.15rem;
}

.hd-vbar {
    flex: 1 1 0;
    min-width: 0;
    max-width: 2.6rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hd-vbar-track {
    width: 0.72rem;
    height: 5.6rem;
    border-radius: 999px;
    background: rgba(120, 108, 92, 0.1);
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    position: relative;
}

.hd-vbar-fill {
    width: 100%;
    min-height: 8%;
    border-radius: 999px;
    background: linear-gradient(180deg, #f0d29a 0%, var(--hd-gold) 55%, var(--hd-gold-deep) 100%);
    transition: height 0.45s ease;
}

.hd-vbar[data-i='0'] .hd-vbar-fill {
    background: linear-gradient(180deg, #e8b4a0 0%, #d49278 55%, #b87058 100%);
}

.hd-vbar[data-i='1'] .hd-vbar-fill {
    background: linear-gradient(180deg, #f0d29a 0%, #e8b86a 55%, #c4923e 100%);
}

.hd-vbar[data-i='2'] .hd-vbar-fill {
    background: linear-gradient(180deg, #dcc48a 0%, #c4a05a 55%, #9a7840 100%);
}

.hd-vbar[data-i='3'] .hd-vbar-fill {
    background: linear-gradient(180deg, #c8c0a0 0%, #a8a078 55%, #7a7458 100%);
}

.hd-vbar[data-i='4'] .hd-vbar-fill {
    background: linear-gradient(180deg, #e0c888 0%, #d4b06a 55%, #a88840 100%);
}

.hd-vbar[data-i='5'] .hd-vbar-fill {
    background: linear-gradient(180deg, #d8c0a0 0%, #c9a06a 55%, #a07848 100%);
}

.hd-vbar-num {
    margin-top: 0.28rem;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--hd-ink);
    line-height: 1;
}

.hd-vbar-k {
    margin-top: 0.18rem;
    font-size: 0.62rem;
    color: var(--hd-muted);
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.hd-summary {
    margin: 0.75rem 0 0;
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--hd-muted);
}

.hd-summary__p {
    margin: 0;
}

.hd-summary__p + .hd-summary__p {
    margin-top: 0.55em;
}

/* 居中模拟太空图：术数胶囊落在辐射线末端 */
.hd-hero-chart {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.hd-radar-wrap {
    position: relative;
    width: min(100%, 560px);
    aspect-ratio: 1;
    margin: 0 auto;
    overflow: visible;
}

.hd-radar-wrap::after {
    content: "";
    position: absolute;
    inset: 3.6%;
    border-radius: 50%;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--hd-gold) 46%, transparent);
    pointer-events: none;
    z-index: 2;
}

.hd-hero-right-copy {
    width: 100%;
    max-width: min(100%, 420px);
    margin: 0.85rem auto 0;
    text-align: center;
}

.hd-chart-caption {
    margin: 0.15rem 0 0;
    font-family: var(--hd-font-display);
    font-size: clamp(1.15rem, 2.4vw, 1.45rem);
    letter-spacing: 0.28em;
    color: #5a4a38;
    text-align: center;
}

.hd-hero-info {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
}

.hd-radar-wrap .astro-svg {
    width: 100%;
    height: auto;
    display: block;
}

.hd-hero-chart .ecliptic,
.hd-hero-chart .ecliptic-inner {
    fill: var(--hd-page);
}

.hd-radar-nodes {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hd-radar-arm {
    --deg: 0deg;
    position: absolute;
    inset: 0;
    transform: rotate(var(--deg));
    pointer-events: none;
}

.hd-radar-node {
    position: absolute;
    left: 50%;
    top: 3.2%;
    z-index: 3;
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 5.4rem;
    padding: 0.32rem 0.72rem;
    border-radius: 999px;
    border: 1px solid rgba(176, 138, 72, 0.48);
    background: linear-gradient(180deg, #fffdf6 0%, #f6ead0 100%);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.85) inset,
        0 4px 12px rgba(90, 60, 20, 0.12);
    color: #3a2f1f;
    font-family: var(--hd-font-serif);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transform: translate(-50%, -50%) rotate(calc(-1 * var(--deg)));
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hd-radar-node:hover {
    border-color: rgba(176, 138, 72, 0.78);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 6px 16px rgba(90, 60, 20, 0.18);
}

.hd-radar-node--soon {
    color: #7a6b5c;
    background: linear-gradient(180deg, #fbf7ee 0%, #efe4d0 100%);
    border-color: rgba(160, 140, 110, 0.35);
    opacity: 0.88;
}

.hd-radar-node--soon:hover {
    opacity: 1;
}

button.hd-radar-node {
    margin: 0;
    appearance: none;
    font-family: var(--hd-font-serif);
}

html.red .hd-radar-node,
html.theme-red .hd-radar-node {
    border-color: rgba(160, 48, 42, 0.42);
    background: linear-gradient(180deg, #fff8f4 0%, #f6ddd4 100%);
    color: #4a221c;
}

html.red .hd-radar-node--soon,
html.theme-red .hd-radar-node--soon {
    background: linear-gradient(180deg, #fbf4f0 0%, #edd8d2 100%);
    color: #7a554c;
}

html.red .hd-chart-caption,
html.theme-red .hd-chart-caption {
    color: #6a322c;
}

html.red .jieqi-name,
html.theme-red .jieqi-name {
    fill: #8a4a42;
}

.hd-radar-tags span {
    position: absolute;
    font-size: 0.72rem;
    font-weight: 700;
    color: #5a5248;
    white-space: nowrap;
}

.hd-yi-ji-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.hd-yi-ji-strip--in-card {
    margin-top: 0.55rem;
    margin-bottom: 0.65rem;
}

.hd-yi-ji-strip .hd-card--yi-ji {
    min-height: 0;
    background: color-mix(in srgb, var(--hd-card) 58%, #ffffff 42%);
    border-color: color-mix(in srgb, var(--hd-gold) 38%, var(--hd-line));
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--hd-gold) 40%, transparent),
        0 8px 22px rgba(42, 30, 18, 0.045);
}

.hd-scenario-strip {
    margin: 0 0 1rem;
    padding: 0.5rem 0.65rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid var(--hd-line);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.hd-scenario-strip__lead {
    margin: 0 0 0.5rem;
    font-size: 0.88rem;
    font-weight: 800;
    color: #3a3228;
    letter-spacing: 0.06em;
}

.hd-scenario-bar.hd-scenario-bar--top {
    margin: 0;
    gap: 0.4rem 0.5rem;
    flex-wrap: wrap;
}

.hd-scenario-bar--top .hd-scenario-btn {
    font-size: 0.86rem;
    font-weight: 800;
    padding: 0.38rem 0.75rem;
    border-radius: 999px;
}

.hd-scenario-bar--top .hd-scenario-empty {
    font-size: 0.8rem;
    padding: 0.25rem 0;
}

.hd-grid6 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 720px) {
    .hd-grid6 {
        grid-template-columns: 1fr;
    }
}

.hd-card {
    background: var(--hd-card);
    border-radius: var(--hd-radius);
    border: 1px solid var(--hd-line);
    box-shadow: var(--hd-shadow);
    padding: 0.85rem 0.9rem;
    min-height: 8.5rem;
}

.hd-card h3 {
    margin: 0 0 0.55rem;
    font-size: 0.92rem;
    font-weight: 800;
}

.hd-card--chuanren-span {
    grid-column: 1 / -1;
    min-height: 0;
}

.hd-card--chuanren-span > h3 {
    margin-bottom: 0.45rem;
}

.hd-chuanren__sub {
    margin: -0.25rem 0 0.55rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: #6a5c48;
    letter-spacing: 0.12em;
}

.hd-chuanren-body {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.7;
    color: #3a342c;
    font-weight: 500;
}

.hd-chuanren-body p {
    margin: 0 0 0.55rem;
}

.hd-chuanren-body p:last-child {
    margin-bottom: 0;
}

.hd-chuanren-body strong {
    font-weight: 800;
    color: #2e2618;
}

.hd-chuanren-placeholder {
    margin: 0;
    color: #7a7168;
    font-size: 0.76rem;
}

.hd-card--qimen-travel-span {
    grid-column: 1 / -1;
    min-height: 0;
}

.hd-qimen-travel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1rem 1.35rem;
    align-items: stretch;
    min-height: 22rem;
}

@media (max-width: 720px) {
    .hd-qimen-travel {
        grid-template-columns: 1fr;
        min-height: 0;
    }
}

.hd-qimen-travel__shichen-panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.hd-qimen-travel__pan-panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.hd-qimen-travel__hint {
    margin: -0.15rem 0 0.5rem;
    font-size: 0.7rem;
    line-height: 1.45;
    color: #7a7168;
    font-weight: 500;
}

.hd-qimen-travel__sub {
    margin: 0 0 0.35rem;
    font-size: 0.9rem;
    font-weight: 800;
    color: #3a342c;
    letter-spacing: 0.02em;
}

.hd-qimen-travel__panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem 0.65rem;
    flex-wrap: wrap;
    margin-bottom: 0.35rem;
}

.hd-qimen-travel__panel-head .hd-qimen-travel__sub {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
}

.hd-qimen-travel__pro-link {
    flex-shrink: 0;
    margin-bottom: 0;
    white-space: nowrap;
    font-size: 0.76rem;
    padding: 0.32rem 0.72rem;
}

.hd-qimen-travel__pro-link-short {
    display: none;
}

.hd-qimen-travel__pro-link-full {
    display: inline;
}

.hd-qimen-travel__pro-link--disabled,
.hd-qimen-travel__pro-link[aria-disabled='true'] {
    opacity: 0.45;
    pointer-events: none;
    cursor: not-allowed;
}

.hd-qimen-dir-head {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    margin-bottom: 0.55rem;
}

.hd-qimen-dir-head__text {
    flex: 1 1 auto;
    min-width: 0;
}

.hd-qimen-dir-head .hd-qimen-travel__pro-link {
    align-self: center;
    margin-left: auto;
}

.hd-qimen-dir-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 50%;
    background: linear-gradient(145deg, #e8c06a, #c9a050);
    color: #fff;
    font-size: 0.85rem;
    line-height: 1;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.hd-qimen-dir-title {
    margin: 0 0 0.2rem;
    font-size: 0.95rem;
    font-weight: 800;
    color: #2e2a26;
}

.hd-qimen-meta-line {
    margin: 0;
    font-size: 0.68rem;
    line-height: 1.45;
    color: #7a7064;
    font-weight: 500;
}

.hd-qimen-scenario-hint {
    margin: 0 0 0.45rem;
    font-size: 0.66rem;
    line-height: 1.45;
    color: #6d655c;
    font-weight: 500;
}

.hd-scenario-guide {
    margin: 0 0 0.45rem;
    padding: 0.55rem 0.65rem;
    border-radius: 8px;
    background: rgba(255, 252, 246, 0.92);
    border: 1px solid rgba(120, 108, 92, 0.14);
    font-size: 0.68rem;
    line-height: 1.55;
    color: #5c534a;
    font-weight: 500;
}

.hd-scenario-guide--placeholder {
    color: #7a7168;
    background: rgba(255, 252, 246, 0.65);
}

.hd-scenario-guide__title {
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    color: #3a342c;
    margin: 0 0 0.35rem;
    letter-spacing: 0.02em;
}

.hd-scenario-guide__body {
    margin: 0;
}

.hd-scenario-dynamic-tip {
    margin: -0.15rem 0 0.45rem;
    padding: 0.38rem 0.55rem;
    border-radius: 6px;
    background: rgba(255, 244, 220, 0.55);
    border-left: 3px solid rgba(184, 140, 70, 0.55);
    font-size: 0.64rem;
    line-height: 1.5;
    color: #6b4a28;
    font-weight: 600;
}

.hd-scenario-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.28rem 0.35rem;
    margin: 0 0 0.4rem;
    align-items: center;
}

.hd-scenario-btn {
    appearance: none;
    border: 1px solid rgba(120, 108, 92, 0.28);
    background: rgba(255, 252, 246, 0.95);
    color: #4a4238;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 0.22rem 0.45rem;
    border-radius: 999px;
    cursor: pointer;
    line-height: 1.2;
}

.hd-scenario-btn:hover {
    border-color: rgba(184, 140, 70, 0.45);
    background: #fffdf8;
}

.hd-scenario-btn--active {
    border-color: rgba(184, 140, 70, 0.75);
    background: linear-gradient(180deg, rgba(255, 244, 220, 0.98) 0%, rgba(245, 228, 198, 0.85) 100%);
    color: #3a2f21;
    box-shadow: 0 1px 2px rgba(42, 30, 18, 0.06);
}

.hd-scenario-tip {
    margin: 0 0 0.45rem;
    font-size: 0.64rem;
    line-height: 1.5;
    color: #5c5348;
    padding: 0.35rem 0.45rem;
    border-radius: 8px;
    background: rgba(255, 250, 240, 0.92);
    border: 1px dashed rgba(180, 152, 118, 0.45);
}

.hd-shichen-row--scenario-best {
    box-shadow: inset 3px 0 0 rgba(200, 150, 60, 0.85);
}

.hd-qdir-cell--scenario-focus {
    box-shadow: inset 0 0 0 2px rgba(200, 150, 60, 0.75), 0 2px 8px rgba(42, 30, 18, 0.08);
}

.hd-yunchou-index {
    display: inline-block;
    min-width: 2.1rem;
    padding: 0.12rem 0.35rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #5a3d12;
    background: rgba(255, 236, 200, 0.95);
    border-radius: 6px;
    border: 1px solid rgba(200, 150, 60, 0.55);
}

.hd-yunchou-index--muted {
    color: #5c5348;
    background: rgba(248, 244, 236, 0.92);
    border-color: rgba(140, 128, 110, 0.35);
    font-weight: 700;
}

.hd-scenario-empty {
    display: block;
    font-size: 0.72rem;
    color: #6b6154;
    padding: 0.35rem 0;
}

.hd-yunchou-empty-hint {
    margin: 0;
    padding: 1.25rem 0.85rem;
    font-size: 0.78rem;
    line-height: 1.55;
    color: #6b6154;
    text-align: center;
}

.hd-yunchou-empty-hint--grid {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 8rem;
    height: 100%;
}

.hd-shichen--readonly {
    pointer-events: none;
}

.hd-shichen--readonly .hd-shichen-row:hover {
    background: inherit;
}

.hd-qimen-dir-grid {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
    gap: 4px;
    background: rgba(120, 108, 92, 0.22);
    border-radius: 10px;
    padding: 4px;
}

.hd-qdir-cell {
    background: rgb(255, 246, 232);
    border-radius: 6px;
    min-height: 0;
    padding: 0.35rem 0.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    text-align: center;
}

.hd-qdir-cell--center {
    background: linear-gradient(160deg, #e8b24a, #d4982e);
    color: #fff;
}

.hd-qdir-cell--center .hd-qdir-cell__dir {
    color: #fff;
    font-weight: 800;
}

.hd-qdir-cell__dir {
    font-size: 0.68rem;
    font-weight: 700;
    color: #3a342c;
}

.hd-qdir-cell__luck {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hd-qdir-cell__luck i {
    display: inline-block;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 2px;
    flex-shrink: 0;
}

.hd-qdir-cell__luck--ji {
    color: #1f7a45;
}
.hd-qdir-cell__luck--ji i {
    background: #2e8b57;
}

.hd-qdir-cell__luck--xiong {
    color: #b03030;
}
.hd-qdir-cell__luck--xiong i {
    position: relative;
    background: #c0392b;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}
.hd-qdir-cell__luck--xiong i::after {
    content: '×';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -52%);
    font-size: 0.45rem;
    line-height: 1;
    color: #fff;
    font-style: normal;
    font-weight: 700;
}

.hd-qdir-cell__luck--ping {
    color: #6b6560;
}
.hd-qdir-cell__luck--ping i {
    background: #a39a90;
}

.hd-shichen.hd-shichen--elevated {
    flex: 1;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    padding: 0.4rem 0.35rem 0.5rem 0.45rem;
    gap: 0.2rem;
    border-radius: 12px;
    border: 1px solid rgba(120, 108, 92, 0.16);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 250, 242, 0.9) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
    scrollbar-width: thin;
    scrollbar-color: rgba(184, 152, 96, 0.55) rgba(120, 108, 92, 0.06);
}

@media (max-width: 720px) {
    .hd-shichen.hd-shichen--elevated {
        flex: none;
        min-height: 12rem;
        max-height: min(24rem, 48vh);
    }
}

.hd-shichen.hd-shichen--elevated::-webkit-scrollbar {
    width: 7px;
}

.hd-shichen.hd-shichen--elevated::-webkit-scrollbar-track {
    background: rgba(120, 108, 92, 0.06);
    border-radius: 999px;
}

.hd-shichen.hd-shichen--elevated::-webkit-scrollbar-thumb {
    background: rgba(184, 152, 96, 0.45);
    border-radius: 999px;
}

.hd-shichen--pick .hd-shichen-row {
    cursor: pointer;
    border-radius: 10px;
    padding: 0.38rem 0.55rem;
    margin: 0;
    transition: background 0.14s ease, box-shadow 0.14s ease;
    border: 1px solid transparent;
}

.hd-shichen--pick .hd-shichen-row:hover {
    background: rgba(201, 160, 80, 0.1);
    border-color: rgba(201, 160, 80, 0.12);
}

.hd-shichen--pick .hd-shichen-row--active {
    background: linear-gradient(135deg, rgba(255, 236, 200, 0.65) 0%, rgba(232, 200, 140, 0.28) 100%);
    border-color: rgba(184, 140, 70, 0.35);
    box-shadow: 0 1px 2px rgba(80, 60, 20, 0.06);
}

.hd-shichen-row__main {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    min-width: 0;
    flex-shrink: 0;
}

.hd-shichen-row__name {
    font-size: 0.82rem;
    font-weight: 800;
    color: #2a2622;
    letter-spacing: 0.04em;
}

.hd-shichen-row__range {
    font-size: 0.68rem;
    font-weight: 500;
    color: #756c62;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
}

.hd-shichen-row__keti {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.22rem 0.32rem;
}

.hd-keti-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 0.12rem;
    max-width: 100%;
    padding: 0.12rem 0.32rem 0.1rem;
    border-radius: 6px;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1.2;
    color: #4a4238;
    background: rgba(255, 252, 246, 0.95);
    border: 1px solid rgba(120, 108, 92, 0.2);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.hd-keti-chip--zhu {
    background: linear-gradient(180deg, rgba(255, 244, 220, 0.95) 0%, rgba(245, 228, 198, 0.75) 100%);
    border-color: rgba(184, 140, 70, 0.35);
}

.hd-keti-chip__role {
    font-size: 0.55rem;
    font-weight: 800;
    color: #7a6a52;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.hd-keti-chip--zhu .hd-keti-chip__role {
    color: #8a5a18;
}

.hd-keti-chip__name {
    letter-spacing: 0.03em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hd-shichen-row__side {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
    max-width: 30%;
}

.hd-shichen-pill {
    flex-shrink: 0;
    min-width: 1.75rem;
    padding: 0.22rem 0.48rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    line-height: 1.25;
    text-align: center;
    border: 1px solid transparent;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65) inset;
}

.hd-shichen-pill--g {
    color: #124a24;
    background: linear-gradient(180deg, #e4f4ea 0%, #b9dfc8 100%);
    border-color: rgba(46, 139, 87, 0.32);
}

.hd-shichen-pill--y {
    color: #5c4818;
    background: linear-gradient(180deg, #fdf6e4 0%, #edd9a8 100%);
    border-color: rgba(180, 140, 50, 0.35);
}

.hd-shichen-pill--r {
    color: #5c1a1a;
    background: linear-gradient(180deg, #fde8e6 0%, #f0b4b0 100%);
    border-color: rgba(176, 60, 50, 0.35);
}

/* 大六壬五档 */
.hd-shichen-pill--dj {
    color: #0d3d1a;
    background: linear-gradient(180deg, #dff7e8 0%, #9fd4b0 100%);
    border-color: rgba(30, 120, 60, 0.38);
}

.hd-shichen-pill--xj {
    color: #1f4a2e;
    background: linear-gradient(180deg, #ecf8ef 0%, #b8dfc6 100%);
    border-color: rgba(46, 120, 80, 0.28);
}

.hd-shichen-pill--zp {
    color: #5c4818;
    background: linear-gradient(180deg, #faf6ea 0%, #e8dcc0 100%);
    border-color: rgba(140, 120, 70, 0.32);
}

.hd-shichen-pill--xx {
    color: #6b3018;
    background: linear-gradient(180deg, #fff0e6 0%, #f0c4a8 100%);
    border-color: rgba(180, 90, 40, 0.35);
}

.hd-shichen-pill--dx {
    color: #4a1010;
    background: linear-gradient(180deg, #fde4e4 0%, #e09898 100%);
    border-color: rgba(140, 40, 40, 0.4);
}

.hd-color-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.78rem;
}

.hd-color-dot {
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

.hd-energy-big {
    text-align: center;
    margin-bottom: 0.5rem;
}

.hd-energy-score {
    font-size: 2rem;
    font-weight: 800;
    color: var(--hd-gold-deep);
}

.hd-bars {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.hd-bar {
    height: 0.45rem;
    border-radius: 999px;
    background: rgba(120, 108, 92, 0.12);
    overflow: hidden;
}

.hd-bar > i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #e8b86a, #f4d49a);
}

.hd-qimen-mini {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
    background: rgba(120, 108, 92, 0.2);
    border-radius: 8px;
    padding: 3px;
    font-size: 0.62rem;
    line-height: 1.25;
}

.hd-qcell {
    background: rgb(255, 243, 224);
    min-height: 3.2rem;
    padding: 0.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 700;
    color: #3a342c;
}

.hd-shichen {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    font-size: 0.74rem;
    max-height: 11rem;
    overflow-y: auto;
}

.hd-shichen-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem 0.45rem;
    min-height: 2.55rem;
}

.hd-dot {
    width: 0.42rem;
    height: 0.42rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.hd-dot--g {
    background: #2e8b57;
}
.hd-dot--y {
    background: #d4a017;
}
.hd-dot--r {
    background: #c0392b;
}

.hd-icon-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem;
    font-size: 0.72rem;
}

.hd-icon-cell {
    text-align: center;
    padding: 0.28rem 0.15rem;
    border-radius: 8px;
    font-weight: 600;
}

.hd-yi .hd-icon-cell {
    background: rgba(46, 139, 87, 0.1);
    color: #1f5c3a;
}

.hd-ji .hd-icon-cell {
    background: rgba(192, 57, 43, 0.1);
    color: #8b2a2a;
}

.hd-icon-cell--empty {
    opacity: 0.72;
    font-weight: 500;
}

.hd-footer {
    position: relative;
    z-index: 2;
    border-top: none;
    padding: 1.35rem clamp(0.75rem, 2.5vw, 1.25rem) 1.75rem;
    max-width: 1180px;
    margin: 0 auto;
    display: block;
    font-size: 0.78rem;
    color: var(--hd-muted);
}

.hd-footer__huiwen {
    height: 10px;
    margin: 1.15rem 0 0;
    background-image: url("/images/decor-huiwen-line.svg");
    background-repeat: repeat-x;
    background-position: center;
    background-size: 48px 10px;
    opacity: 0.32;
    pointer-events: none;
}

.hd-footer__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: clamp(1.5rem, 3.5vw, 2.75rem);
    row-gap: 1.5rem;
    align-items: start;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 clamp(0.15rem, 1vw, 0.5rem);
}

.hd-footer__nav-cols {
    display: contents;
}

.hd-footer__why {
    min-width: 0;
    padding: 0.1rem 0.15rem 0.1rem 0;
}

.hd-footer__why-lead {
    margin: 0 0 0.95rem;
    padding: 0 0.2rem;
    font-family: var(--hd-font-serif);
    font-size: 0.84rem;
    font-weight: 400;
    line-height: 1.75;
    letter-spacing: 0.06em;
    color: #7a6b5c;
}

.hd-footer__why-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.hd-footer__why-list li {
    margin: 0;
    padding: 0.15rem 0.2rem 0.15rem 0.65rem;
    border-left: 2px solid rgba(196, 146, 62, 0.28);
}

.hd-footer__why-list strong {
    display: block;
    margin-bottom: 0.28rem;
    font-family: var(--hd-font-serif);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    color: #6b4a1f;
}

.hd-footer__why-list span {
    display: block;
    font-family: var(--hd-font-serif);
    font-size: 0.78rem;
    font-weight: 400;
    line-height: 1.72;
    letter-spacing: 0.045em;
    color: #8a7968;
}

.hd-footer__legal {
    width: 100%;
    min-width: 0;
    margin-top: 1.35rem;
    padding-top: 1.1rem;
    border-top: 1px solid rgba(140, 102, 50, 0.14);
    text-align: center;
    font-family: var(--hd-font-serif);
    font-weight: 400;
    letter-spacing: 0.045em;
    color: #8a7968;
}

.hd-footer__legal.site-compliance-footer {
    text-align: center;
}

.hd-footer__legal .site-compliance-footer__disclaimer {
    margin-left: auto;
    margin-right: auto;
    max-width: 42rem;
    font-family: inherit;
    font-size: 0.74rem;
    line-height: 1.7;
    letter-spacing: 0.04em;
    color: #9a8876;
}

.hd-footer__legal .site-compliance-footer__links {
    justify-content: center;
    gap: 0.4rem 1rem;
}

.hd-footer__legal .site-compliance-footer__links a {
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: #8c6632;
}

.hd-footer__legal .site-compliance-footer__traffic {
    margin: 0.4rem 0 0.2rem;
}

.hd-footer__legal .site-compliance-footer__traffic strong {
    color: #5c4a38;
}

.hd-footer__legal .site-compliance-footer__legal,
.hd-footer__legal .site-compliance-footer__payment {
    font-family: inherit;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    color: #9a8876;
}

.hd-footer__col {
    min-width: 0;
    width: 100%;
    text-align: left;
    padding: 0.15rem 0;
    border-right: none;
}

.hd-footer__col--arts {
    min-width: 0;
}

.hd-footer__col--funcs {
    min-width: 0;
    padding-left: clamp(2.25rem, 6.5vw, 4.25rem);
}

.hd-footer__arts-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 0.45rem;
    row-gap: 0.12rem;
    min-width: 0;
}

.hd-footer__soon {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.38rem 0.55rem;
    font-family: var(--hd-font-serif);
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    color: #a89886;
    opacity: 0.9;
    cursor: default;
}

.hd-footer__about {
    min-width: 0;
    width: 100%;
    text-align: left;
    padding: 0.15rem 0;
    border-left: none;
}

.hd-footer__about-title {
    margin: 0 0 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: var(--hd-font-display);
    font-size: 1.22rem;
    font-weight: 400;
    letter-spacing: 0.26em;
    line-height: 1;
    color: #4a3f32;
}

.hd-footer__about-title::before {
    content: "";
    width: 0.28rem;
    height: 0.28rem;
    border-radius: 50%;
    background: linear-gradient(145deg, #efc88a, #c4923a);
    box-shadow: 0 0 0 3px rgba(232, 184, 106, 0.22);
}

.hd-footer__about-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.22rem;
}

.hd-footer__about-item {
    margin: 0;
}

.hd-footer__about-item--legal {
    margin-top: 0;
}

.hd-footer__about-item:not(.hd-footer__about-item--legal) + .hd-footer__about-item--legal {
    margin-top: 0.2rem;
    padding-top: 0;
    border-top: none;
}

.hd-footer__about-list a,
.hd-footer__link-btn {
    display: flex;
    align-items: center;
    width: 100%;
    margin: 0;
    padding: 0.38rem 0.55rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    font-family: var(--hd-font-serif);
    font-size: 0.86rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    line-height: 1.4;
    color: #5a4e40;
    text-decoration: none;
    text-align: left;
    cursor: pointer;
    transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.hd-footer__about-item--brand a {
    font-family: var(--hd-font-display);
    font-size: 1.02rem;
    font-weight: 400;
    letter-spacing: 0.14em;
    color: #7a5a2e;
}

.hd-footer__about-item--legal a {
    font-family: var(--hd-font-serif);
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: #8a7968;
}

.hd-footer__about-list a:hover,
.hd-footer__link-btn:hover {
    color: #6b4a1f;
    background: rgba(232, 184, 106, 0.14);
    text-decoration: none;
    transform: translateX(2px);
}

.hd-footer__link-btn--highlight {
    color: #6b4218;
    font-weight: 600;
    letter-spacing: 0.14em;
    background: linear-gradient(180deg, rgba(255, 236, 196, 0.95), rgba(245, 210, 140, 0.72));
    border: 1px solid rgba(196, 146, 62, 0.42);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65) inset, 0 2px 8px rgba(180, 130, 50, 0.12);
}

.hd-footer__link-btn--highlight:hover {
    color: #5a340f;
    background: linear-gradient(180deg, rgba(255, 242, 210, 1), rgba(240, 198, 118, 0.88));
    border-color: rgba(180, 120, 40, 0.55);
    transform: translateX(2px);
}

.hd-footer__about-list a:focus-visible,
.hd-footer__link-btn:focus-visible {
    outline: 2px solid rgba(196, 138, 46, 0.45);
    outline-offset: 1px;
}

.hd-footer-help-body {
    padding: 0.25rem 1.15rem 1.15rem;
    font-size: 0.88rem;
    line-height: 1.7;
    color: #5a5248;
}

.hd-footer-help-body p {
    margin: 0 0 0.7rem;
}

.hd-footer-help-body p:last-child {
    margin-bottom: 0;
}

.hd-footer-kefu-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 0.15rem 1rem 1.25rem;
    text-align: center;
}

.hd-footer-kefu-qr {
    width: min(17.5rem, 78vw);
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    background: #fff;
    border: 1px solid rgba(140, 102, 50, 0.16);
    box-shadow: 0 8px 22px rgba(58, 47, 33, 0.08);
}

.hd-footer-kefu-hint {
    margin: 0;
    max-width: 18rem;
    font-size: 0.82rem;
    line-height: 1.55;
    color: #7a6b5c;
}

.hd-modal--kefu {
    max-width: 22rem;
}

.hd-footer__mobile-pwa {
    display: none;
}

.hd-footer__pwa-btn {
    appearance: none;
    border: 1px solid rgba(196, 146, 62, 0.45);
    background: linear-gradient(180deg, rgba(255, 236, 196, 0.98), rgba(245, 210, 140, 0.82));
    color: #6b4218;
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 0.58rem 1.2rem;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 2px 10px rgba(180, 130, 50, 0.16);
}

.hd-footer__pwa-btn:hover {
    border-color: rgba(180, 120, 40, 0.6);
    color: #5a340f;
    background: linear-gradient(180deg, rgba(255, 242, 210, 1), rgba(240, 198, 118, 0.92));
}

.hd-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.hd-footer-links a {
    color: #5a5248;
    text-decoration: none;
}

.hd-footer-links a:hover {
    text-decoration: underline;
}

/* PWA 安装引导弹层 */
.hd-pwa-modal {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.hd-pwa-modal[hidden] {
    display: none !important;
}

.hd-pwa-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(58, 47, 33, 0.35);
    backdrop-filter: blur(3px);
}

.hd-pwa-modal__panel {
    position: relative;
    width: min(22rem, 100%);
    background: #fffdf8;
    border: 1px solid rgba(120, 108, 92, 0.18);
    border-radius: 14px;
    padding: 1.25rem 1.2rem 1.1rem;
    box-shadow: 0 18px 48px rgba(58, 47, 33, 0.18);
}

.hd-pwa-modal__close {
    position: absolute;
    top: 0.45rem;
    right: 0.55rem;
    border: none;
    background: transparent;
    font-size: 1.35rem;
    line-height: 1;
    color: #8a7968;
    cursor: pointer;
}

.hd-pwa-modal__title {
    margin: 0 1.5rem 0.75rem 0;
    font-size: 1.05rem;
    color: #3f362c;
}

.hd-pwa-modal__body {
    font-size: 0.88rem;
    line-height: 1.65;
    color: #5a5248;
}

.hd-pwa-modal__body p {
    margin: 0 0 0.65rem;
}

.hd-pwa-steps {
    margin: 0 0 0.75rem;
    padding-left: 1.15rem;
}

.hd-pwa-steps li + li {
    margin-top: 0.35rem;
}

.hd-pwa-hint {
    margin: 0;
    font-size: 0.78rem;
    color: #8a7968;
}

.hd-pwa-warn {
    margin: 0 0 0.75rem;
    padding: 0.55rem 0.65rem;
    font-size: 0.8rem;
    line-height: 1.55;
    color: #6b3a28;
    background: #f8ece4;
    border-radius: 8px;
}

.hd-pwa-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
}

.hd-pwa-modal__btn {
    appearance: none;
    border: 1px solid rgba(120, 108, 92, 0.22);
    background: #fff;
    color: #5a5248;
    font-size: 0.86rem;
    padding: 0.45rem 0.9rem;
    border-radius: 8px;
    cursor: pointer;
}

.hd-pwa-modal__btn--primary {
    border-color: transparent;
    background: linear-gradient(180deg, #efc88a, #e0b46a);
    color: #4a3518;
    font-weight: 600;
}

body.hd-pwa-modal-open {
    overflow: hidden;
}

/* 命书弹窗：内嵌 calculator 全表单（iframe），浅色与首页统一 */
.hd-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(74, 64, 52, 0.22);
    backdrop-filter: blur(4px);
    display: grid;
    place-items: center;
    padding: max(0.35rem, env(safe-area-inset-top, 0px)) max(0.35rem, env(safe-area-inset-right, 0px))
        max(0.35rem, env(safe-area-inset-bottom, 0px)) max(0.35rem, env(safe-area-inset-left, 0px));
}

.hd-modal-backdrop[hidden] {
    display: none !important;
}

.hd-modal--lifebook {
    width: min(96vw, 1200px);
    height: min(calc(100vh - 10px), 860px);
    height: min(calc(100svh - 10px), 860px);
    max-height: min(calc(100vh - 10px), 860px);
    max-height: min(calc(100svh - 10px), 860px);
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    padding: 0.65rem 0.75rem 0.7rem;
    background: var(--hd-card);
    background: color-mix(in srgb, var(--hd-card) 96%, var(--hd-page) 4%);
    border: 1px solid var(--hd-lifebook-border);
    box-shadow: 0 18px 48px rgba(42, 30, 18, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.65) inset;
    color: var(--hd-ink);
    box-sizing: border-box;
    overflow: hidden;
}

@media (max-width: 640px) {
    .hd-modal--lifebook {
        width: 100%;
        height: auto;
        max-height: min(88dvh, 720px);
    }
}

.hd-lifebook-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.4rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--hd-line);
    flex-shrink: 0;
}

.hd-lifebook-head__text {
    flex: 1 1 auto;
    min-width: 0;
}

.hd-modal-sheet-handle {
    display: none;
    width: 2.25rem;
    height: 0.22rem;
    margin: 0.35rem auto 0.45rem;
    border-radius: 999px;
    background: rgba(58, 47, 33, 0.18);
    flex-shrink: 0;
}

.hd-lifebook-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--hd-ink);
    letter-spacing: 0.02em;
}

.hd-lifebook-close {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 10px;
    border: 1px solid var(--hd-line);
    background: rgba(255, 255, 255, 0.72);
    background: color-mix(in srgb, var(--hd-page) 55%, white 45%);
    color: var(--hd-muted);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.hd-lifebook-close:hover {
    border-color: rgba(196, 146, 62, 0.45);
    background: rgba(255, 255, 255, 0.75);
    color: var(--hd-ink);
}

.hd-lifebook-hint {
    margin: 0.15rem 0 0;
    font-size: 0.72rem;
    line-height: 1.38;
    color: var(--hd-muted);
    flex-shrink: 0;
}

.hd-lifebook-frame {
    flex: 1 1 auto;
    min-height: min(420px, 52vh);
    width: 100%;
    height: 100%;
    border: 1px solid var(--hd-lifebook-border);
    border-radius: 10px;
    background: var(--hd-page);
    box-sizing: border-box;
}

.hd-modal--archive {
    width: min(92vw, 520px);
    max-height: min(88vh, 640px);
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    padding: 0.65rem 0.75rem 0.75rem;
    background: var(--hd-card);
    background: color-mix(in srgb, var(--hd-card) 96%, var(--hd-page) 4%);
    border: 1px solid var(--hd-lifebook-border);
    box-shadow: 0 18px 48px rgba(42, 30, 18, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.65) inset;
    color: var(--hd-ink);
    box-sizing: border-box;
    overflow: hidden;
}

.hd-modal--archive-edit {
    width: min(96vw, 640px);
    max-height: min(92vh, 780px);
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    padding: 0.65rem 0.75rem 0.75rem;
    background: var(--hd-card);
    background: color-mix(in srgb, var(--hd-card) 96%, var(--hd-page) 4%);
    border: 1px solid var(--hd-lifebook-border);
    box-shadow: 0 18px 48px rgba(42, 30, 18, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.65) inset;
    color: var(--hd-ink);
    box-sizing: border-box;
    overflow: hidden;
}

.hd-archive-edit-frame {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    height: min(68vh, 620px);
    border: 1px solid var(--hd-lifebook-border);
    border-radius: 10px;
    background: var(--hd-page);
    box-sizing: border-box;
}

.hd-modal--invite {
    width: min(92vw, 420px);
    border-radius: 16px;
    padding: 0.65rem 0.85rem 0.85rem;
    background: var(--hd-card);
    background: color-mix(in srgb, var(--hd-card) 96%, var(--hd-page) 4%);
    border: 1px solid var(--hd-lifebook-border);
    box-shadow: 0 18px 48px rgba(42, 30, 18, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.65) inset;
    color: var(--hd-ink);
    box-sizing: border-box;
}

.hd-invite-form {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.hd-invite-form label {
    font-size: 0.86rem;
    font-weight: 600;
}

.hd-invite-form input {
    padding: 0.55rem 0.65rem;
    border-radius: 10px;
    border: 1px solid var(--hd-line);
    font-size: 0.92rem;
    font-family: inherit;
}

.hd-invite-message {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.5;
    border-radius: 10px;
    padding: 0.5rem 0.65rem;
    white-space: pre-line;
}

.hd-invite-message.is-ok {
    color: #1f6b45;
    background: rgba(46, 125, 80, 0.12);
}

.hd-invite-message.is-err {
    color: #8b2f2f;
    background: rgba(214, 91, 91, 0.09);
}

.hd-invite-submit {
    width: 100%;
    margin-top: 0.15rem;
}

.hd-archive-search {
    display: flex;
    gap: 0.45rem;
    margin-bottom: 0.55rem;
    flex-shrink: 0;
}

.hd-archive-batch-bar {
    display: flex;
    flex-direction: column;
    gap: 0.42rem;
    margin-bottom: 0.55rem;
    flex-shrink: 0;
}

.hd-archive-batch-bar-main,
.hd-archive-batch-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.38rem 0.45rem;
}

.hd-archive-batch-btn {
    flex-shrink: 0;
    height: 1.85rem;
    border-radius: 9px;
    border: 1px solid rgba(200, 165, 110, 0.45);
    background: rgba(255, 254, 249, 0.96);
    color: #4a361f;
    padding: 0 0.68rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.2;
}

.hd-archive-batch-btn:hover:not(:disabled) {
    background: rgba(248, 208, 142, 0.18);
}

.hd-archive-batch-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.hd-archive-batch-btn--danger {
    border-color: rgba(180, 60, 50, 0.32);
    color: #8b3228;
    background: rgba(220, 80, 60, 0.06);
}

.hd-archive-batch-btn--danger:hover:not(:disabled) {
    background: rgba(220, 80, 60, 0.12);
}

.hd-archive-batch-select-all {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    font-size: 0.74rem;
    color: var(--hd-ink-muted, #6b5a48);
    cursor: pointer;
    user-select: none;
}

.hd-archive-item-wrap--batch {
    align-items: center;
}

.hd-archive-item__check {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    padding-left: 0.12rem;
}

.hd-archive-item__checkbox {
    width: 1rem;
    height: 1rem;
    margin: 0;
    accent-color: #c8923a;
    cursor: pointer;
}

.hd-archive-item-wrap--batch .hd-archive-item__delete {
    display: none;
}

.hd-archive-item-wrap--batch .hd-archive-item {
    cursor: default;
}

.hd-archive-search--celeb {
    flex-wrap: wrap;
    align-items: stretch;
}

.hd-archive-search__input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.45rem 0.62rem;
    border: 1px solid var(--hd-line);
    border-radius: 10px;
    font-size: 0.82rem;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.78);
    color: var(--hd-ink);
    box-sizing: border-box;
    height: 2.35rem;
    line-height: 1.2;
}

.hd-archive-search__year,
.hd-archive-search__select {
    flex: 0 0 auto;
    min-width: 0;
    box-sizing: border-box;
    height: 2.35rem;
    padding: 0.45rem 0.55rem;
    border: 1px solid var(--hd-line);
    border-radius: 10px;
    font-size: 0.82rem;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.78);
    color: var(--hd-ink);
    line-height: 1.2;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.hd-archive-search__year {
    width: 5.6rem;
}

.hd-archive-search__year::-webkit-outer-spin-button,
.hd-archive-search__year::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.hd-archive-search__year[type='number'] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.hd-archive-search__select {
    width: 7.2rem;
    max-width: 42vw;
    padding-right: 1.65rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236a5840' d='M1 1.5L6 6.5L11 1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.55rem center;
    background-size: 0.7rem;
    cursor: pointer;
}

.hd-archive-search__select--region {
    width: 9.2rem;
    max-width: 48vw;
}

.hd-archive-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding-right: 0.12rem;
}

.hd-archive-item {
    border: 1px solid rgba(126, 96, 58, 0.18);
    background: rgba(255, 255, 255, 0.86);
    border-radius: 12px;
    padding: 0.58rem 0.68rem;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
    cursor: pointer;
    font-family: inherit;
    color: inherit;
    flex: 1;
    min-width: 0;
}

.hd-archive-item-wrap {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.4rem;
}

.hd-archive-item-wrap .hd-archive-item {
    flex: 1 1 auto;
    min-width: 0;
}

.hd-archive-item__tools {
    flex: 1 1 100%;
    display: flex;
    align-items: stretch;
    gap: 0.32rem;
    margin-top: 0.02rem;
    padding: 0 0.05rem 0.08rem;
}

.hd-archive-item__tool-btn {
    flex: 1 1 0;
    min-width: 0;
    min-height: 1.65rem;
    padding: 0.2rem 0.1rem;
    border: 1px solid rgba(126, 96, 58, 0.22);
    border-radius: 8px;
    background: rgba(255, 252, 244, 0.96);
    color: rgba(58, 42, 21, 0.88);
    font-size: 0.68rem;
    font-weight: 650;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.hd-archive-item__tool-btn:hover {
    background: rgba(248, 208, 142, 0.28);
    border-color: rgba(196, 154, 88, 0.45);
}

.hd-archive-item__tool-btn:active {
    transform: translateY(1px);
}

.hd-archive-item-wrap--batch .hd-archive-item__tools {
    display: none;
}

.hd-archive-item__actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.35rem;
    flex: 0 0 auto;
    align-self: center;
}

.hd-archive-item__edit {
    flex: 0 0 auto;
    align-self: center;
    font-size: 0.72rem;
    padding: 0.28rem 0.48rem;
    white-space: nowrap;
    line-height: 1.2;
    border-radius: 8px;
    border: 1px solid rgba(126, 96, 58, 0.28);
    background: rgba(255, 252, 244, 0.96);
    color: rgba(58, 42, 21, 0.88);
    cursor: pointer;
    font-family: inherit;
}

.hd-archive-item__edit:hover {
    background: rgba(248, 208, 142, 0.28);
    border-color: rgba(196, 154, 88, 0.45);
}

.hd-archive-item-wrap--batch .hd-archive-item__actions {
    display: none;
}

.hd-archive-item__delete {
    flex: 0 0 auto;
    align-self: center;
    font-size: 0.72rem;
    padding: 0.28rem 0.48rem;
    white-space: nowrap;
    line-height: 1.2;
    border-radius: 8px;
    border: 1px solid rgba(180, 60, 50, 0.28);
    background: rgba(220, 80, 60, 0.06);
    color: #8b3228;
    cursor: pointer;
    font-family: inherit;
}

.hd-archive-item__delete:hover {
    background: rgba(220, 80, 60, 0.12);
}

.hd-archive-item:hover {
    background: rgba(248, 208, 142, 0.24);
    border-color: rgba(196, 146, 62, 0.42);
}

.hd-archive-item--self {
    border-color: rgba(228, 176, 82, 0.78);
    box-shadow: 0 0 0 1px rgba(228, 176, 82, 0.22);
}

.hd-archive-item__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
}

.hd-archive-item__name {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--hd-ink);
}

.hd-archive-item__self-tag {
    flex-shrink: 0;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.12rem 0.38rem;
    border-radius: 999px;
    background: rgba(228, 176, 82, 0.22);
    color: #8a6733;
}

.hd-archive-item__meta {
    font-size: 0.72rem;
    color: var(--hd-muted);
}

.hd-archive-item__place {
    font-size: 0.74rem;
    font-weight: 600;
    color: #5a4630;
    width: 100%;
    text-align: center;
    line-height: 1.45;
}

.hd-archive-item__bazi {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.hd-archive-empty {
    padding: 1.2rem 0.5rem;
    text-align: center;
    font-size: 0.82rem;
    color: var(--hd-muted);
    line-height: 1.5;
}

.hd-archive-foot {
    margin: 0.55rem 0 0;
    flex-shrink: 0;
    font-size: 0.74rem;
    color: var(--hd-muted);
    text-align: center;
}

.hd-archive-foot a {
    color: #8a6733;
    font-weight: 700;
    text-decoration: none;
}

.hd-archive-foot a:hover {
    text-decoration: underline;
}

/* ========== 国风氛围层：左右整幅照搬效果图，不进入交互 ========== */
.hd-guofeng-decor {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    user-select: none;
}

.hd-gf-panel {
    position: absolute;
    top: 5.15rem;
    bottom: 0;
    height: calc(100% - 5.15rem);
    width: min(420px, max(0px, calc((100vw - 680px) / 2)));
    object-fit: contain;
    pointer-events: none;
    display: block;
}

.hd-gf-panel > img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    pointer-events: none;
}

.hd-gf-panel--left {
    left: 0;
    opacity: 0.94;
    -webkit-mask-image:
        linear-gradient(to right, #000 78%, transparent 100%),
        linear-gradient(to top, #000 0%, #000 24%, transparent 28%);
    mask-image:
        linear-gradient(to right, #000 78%, transparent 100%),
        linear-gradient(to top, #000 0%, #000 24%, transparent 28%);
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
}

.hd-gf-panel--left > img {
    object-position: left bottom;
}

.hd-gf-panel--right {
    right: 0;
    opacity: 0.94;
    -webkit-mask-image:
        linear-gradient(to left, #000 78%, transparent 100%),
        linear-gradient(to bottom, #000 0%, #000 30%, transparent 36%);
    mask-image:
        linear-gradient(to left, #000 78%, transparent 100%),
        linear-gradient(to bottom, #000 0%, #000 30%, transparent 36%);
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
}

.hd-gf-panel--right > img {
    object-position: right top;
}

/* 暖主题：右上祥云 / 卷轴随「暖」转暖金；红主题用原图朱红 */
html:not(.red):not(.theme-red) .hd-gf-panel--right {
    filter: sepia(0.78) saturate(1.08) hue-rotate(6deg) brightness(1.14);
}

html.red .hd-gf-panel--right,
html.theme-red .hd-gf-panel--right {
    filter: none;
}

.hd-gf-gutter {
    display: none;
}

/* 右下「二十四节气」：独立铭牌，暖/红主题跟右上装饰同清晰度 */
.hd-jieqi-mark {
    position: fixed;
    z-index: 2;
    right: 16px;
    bottom: 28px;
    pointer-events: none;
    padding: 1.15rem 0.72rem;
    background-color: #fdfaf3;
    background-image: url("/images/texture-paper-grain.svg");
    background-size: 160px 160px;
    border: 10px solid transparent;
    border-image: url("/images/decor-huiwen-frame.svg") 16 / 10px / 0 stretch;
    box-shadow: 0 6px 16px rgba(42, 30, 18, 0.08);
}

.hd-jieqi-mark__text {
    display: block;
    writing-mode: vertical-rl;
    font-family: var(--hd-font-serif);
    font-size: 1.08rem;
    font-weight: 600;
    letter-spacing: 0.42em;
    line-height: 1.2;
    color: #6b4220;
}

html.red .hd-jieqi-mark__text,
html.theme-red .hd-jieqi-mark__text {
    color: #7b2222;
}

/* 左侧《道德经》书框：宣纸底 + 回纹金描边，宽屏左留白，不挡中间排盘 */
.hd-ddj {
    position: fixed;
    z-index: 2;
    left: 52px;
    top: 7.4rem;
    width: min(186px, calc((100vw - 680px) / 2 - 20px));
    pointer-events: auto;
}

.hd-ddj__frame {
    position: relative;
    box-sizing: border-box;
    padding: 10px 12px 8px;
    background: none;
    background-color: transparent;
    border: 24px solid transparent;
    border-image-source: url("/images/decor-ddj-ref-stroke.png");
    border-image-slice: 36;
    border-image-width: 24px;
    border-image-repeat: stretch;
}

.hd-ddj__scroll {
    position: relative;
    z-index: 0;
    writing-mode: vertical-rl;
    overflow: auto;
    height: min(46vh, 420px);
    max-width: 100%;
    background: transparent;
}

.hd-ddj__title {
    margin: 0 0 0 0.75em;
    padding-left: 0.35em;
    font-family: var(--hd-font-serif);
    font-size: 0.84rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    color: #6b221c;
    box-shadow: -1px 0 0 rgba(197, 160, 89, 0.28);
}

.hd-ddj__body {
    margin: 0;
    font-family: var(--hd-font-serif);
    font-size: 0.86rem;
    font-weight: 500;
    line-height: 2.1;
    letter-spacing: 0.12em;
    color: #332211;
    background-image: repeating-linear-gradient(
        to left,
        transparent 0,
        transparent calc(2.1em - 1px),
        rgba(197, 160, 89, 0.22) calc(2.1em - 1px),
        rgba(197, 160, 89, 0.22) 2.1em
    );
}

.hd-ddj__nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem;
    margin-top: 0.5rem;
    padding: 0 2px;
}

.hd-ddj__btn {
    flex: 0 0 auto;
    padding: 0.22rem 0.42rem;
    border: 1px solid rgba(196, 146, 62, 0.7);
    border-radius: 4px;
    background: color-mix(in srgb, var(--hd-card) 86%, #f3e4c0);
    color: #6b2a22;
    font-family: var(--hd-font-serif);
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    cursor: pointer;
}

.hd-ddj__btn:hover {
    border-color: var(--hd-gold-deep);
    background: #fff8ea;
}

.hd-ddj__page {
    font-family: var(--hd-font-serif);
    font-size: 0.66rem;
    color: #5a3a2e;
    opacity: 0.9;
    white-space: nowrap;
}

/* Windows 桌面：逐字高亮 + 书页翻转（窄屏 / 非 Windows 不启用） */
html.hd-ddj-win .hd-ddj__book {
    perspective: 980px;
    transform-style: preserve-3d;
}

html.hd-ddj-win .hd-ddj__frame {
    transform-origin: left center;
    backface-visibility: hidden;
    will-change: transform, filter;
}

html.hd-ddj-win .hd-ddj.is-turn-next .hd-ddj__frame {
    animation: hd-ddj-flip-next 0.52s cubic-bezier(0.22, 0.68, 0.28, 1) both;
}

html.hd-ddj-win .hd-ddj.is-turn-prev .hd-ddj__frame {
    animation: hd-ddj-flip-prev 0.52s cubic-bezier(0.22, 0.68, 0.28, 1) both;
}

@keyframes hd-ddj-flip-next {
    0% {
        transform: rotateY(0deg);
        filter: brightness(1);
        box-shadow: none;
    }
    42% {
        transform: rotateY(-72deg);
        filter: brightness(1.12);
        box-shadow: -18px 0 28px rgba(90, 58, 28, 0.16);
    }
    100% {
        transform: rotateY(-168deg);
        filter: brightness(0.86);
        opacity: 0.28;
    }
}

@keyframes hd-ddj-flip-prev {
    0% {
        transform: rotateY(0deg);
        filter: brightness(1);
    }
    42% {
        transform: rotateY(72deg);
        filter: brightness(1.1);
        box-shadow: 18px 0 28px rgba(90, 58, 28, 0.14);
    }
    100% {
        transform: rotateY(168deg);
        filter: brightness(0.86);
        opacity: 0.28;
    }
}

html.hd-ddj-win .hd-ddj__ch {
    display: inline;
    padding: 0.06em 0.02em;
    border-radius: 0;
    color: #2f2418;
    background: none;
    text-shadow: none;
    transition: color 0.42s ease, opacity 0.42s ease, text-shadow 0.42s ease;
}

html.hd-ddj-win .hd-ddj__ch.is-read {
    color: #5a4636;
    opacity: 0.82;
}

html.hd-ddj-win .hd-ddj__ch.is-now {
    color: #8f2a22;
    opacity: 1;
    background: radial-gradient(
        ellipse 72% 58% at 50% 48%,
        rgba(196, 86, 58, 0.1) 0%,
        rgba(232, 184, 106, 0.08) 42%,
        transparent 74%
    );
    text-shadow:
        0 0 0.04em rgba(143, 42, 34, 0.18),
        0 0 0.42em rgba(196, 86, 58, 0.16);
    animation: hd-ddj-ink 0.36s ease;
}

@keyframes hd-ddj-ink {
    0% {
        color: #3a2818;
        text-shadow: none;
        opacity: 0.7;
    }
    100% {
        color: #8f2a22;
        opacity: 1;
    }
}

@media (max-width: 1199px) {
    .hd-guofeng-decor,
    .hd-ddj,
    .hd-jieqi-mark {
        display: none !important;
    }
}

.hd-hero-chart .radar-ring {
    stroke: rgba(118, 98, 70, 0.2);
}

.hd-hero-chart .radar-ring--4 {
    stroke: rgba(118, 98, 70, 0.16);
}

.hd-hero-chart .ecliptic,
.hd-hero-chart .ecliptic-inner {
    fill: color-mix(in srgb, var(--hd-page) 62%, #ffffff 38%);
}

