:root {
            --primary: #1e88e5;
            --primary-dark: #1565c0;
            --primary-light: #42a5f5;
            --bg-dark: #0a0e17;
            --bg-card: #131a2b;
            --bg-card-hover: #1a2438;
            --text-primary: #ffffff;
            --text-secondary: #94a3b8;
            --text-muted: #64748b;
            --border: #2d3a4f;
            --water: #00bcd4;
            --wood: #4caf50;
            --fire: #f44336;
            --earth: #a67c52;
            --metal: #ffd700;
        }

        * { margin: 0; padding: 0; box-sizing: border-box; }

        body {
            font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
            background: linear-gradient(135deg, #0a0e17 0%, #1a1f2e 100%);
            color: var(--text-primary);
            min-height: 100vh;
            padding: 20px;
        }

        .container { max-width: 1200px; margin: 0 auto; }
        h1 { text-align: center; color: var(--primary-light); margin-bottom: 24px; font-size: 28px; letter-spacing: 2px; }

        .app-header {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 14px;
            margin: 4px 0 20px;
        }
        .brand-mark {
            display: grid;
            width: 48px;
            height: 48px;
            place-items: center;
            border: 1px solid rgba(66, 165, 245, 0.55);
            border-radius: 14px;
            background: linear-gradient(135deg, rgba(30, 136, 229, 0.28), rgba(13, 71, 161, 0.14));
            color: var(--primary-light);
            font-family: serif;
            font-size: 25px;
            box-shadow: 0 8px 24px rgba(30, 136, 229, 0.14);
        }
        h1.app-title {
            margin: 0;
            text-align: left;
            color: var(--text-primary);
            font-size: 23px;
            letter-spacing: 3px;
        }
        .app-subtitle {
            margin-top: 4px;
            color: var(--text-muted);
            font-size: 12px;
            letter-spacing: 2px;
        }
        .version-badge {
            align-self: flex-start;
            padding: 3px 7px;
            border-radius: 999px;
            background: rgba(66, 165, 245, 0.15);
            color: var(--primary-light);
            font-size: 10px;
            font-weight: 700;
        }

        /* ========== 顶部导航栏 ========== */
        .top-nav {
            display: flex;
            justify-content: center;
            gap: 8px;
            margin-bottom: 24px;
            background: var(--bg-card);
            padding: 8px;
            border-radius: 14px;
            border: 1px solid var(--border);
        }
        .nav-tab {
            padding: 12px 28px;
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.3s;
            font-size: 15px;
            font-weight: 500;
            color: var(--text-secondary);
            background: transparent;
            border: none;
        }
        .nav-tab:hover {
            background: var(--bg-card-hover);
            color: var(--text-primary);
        }
        .nav-tab.active {
            background: linear-gradient(135deg, var(--primary), var(--primary-dark));
            color: white;
            box-shadow: 0 4px 15px rgba(30, 136, 229, 0.3);
        }

        /* ========== 页面面板 ========== */
        .page-panel {
            display: none;
        }
        .page-panel.active {
            display: block;
            animation: fadeIn 0.3s ease;
        }

        @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

        /* ========== 输入面板 ========== */
        .input-panel {
            background: var(--bg-card);
            border-radius: 16px;
            padding: 24px;
            margin-bottom: 24px;
            border: 1px solid var(--border);
        }

        .form-group { margin-bottom: 16px; }
        .form-label { display: block; margin-bottom: 8px; color: var(--text-secondary); font-size: 14px; }
        .form-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

        .form-input {
            width: 100%;
            padding: 12px 14px;
            background: var(--bg-dark);
            border: 1px solid var(--border);
            border-radius: 10px;
            color: var(--text-primary);
            font-size: 15px;
            transition: all 0.2s;
        }
        .form-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.2); }
        
        input[type="date"]::-webkit-calendar-picker-indicator,
        input[type="time"]::-webkit-calendar-picker-indicator {
            filter: invert(1);
            cursor: pointer;
        }

        .submit-btn {
            width: 100%;
            padding: 14px;
            background: linear-gradient(135deg, var(--primary), var(--primary-dark));
            border: none;
            border-radius: 12px;
            color: white;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            margin-top: 8px;
            transition: all 0.3s;
        }
        .submit-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(30, 136, 229, 0.4); }
        .submit-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

        .error { color: #ef4444; text-align: center; margin-top: 12px; font-size: 14px; }
        .field-hint { color: var(--text-muted); font-size: 11px; margin-top: 6px; line-height: 1.5; }
        .longitude-override { margin-top: 8px; color: var(--text-secondary); font-size: 12px; }
        .longitude-override summary { cursor: pointer; color: var(--primary-light); margin-bottom: 8px; }
        .longitude-override .form-label { margin-top: 6px; }

        .calendar-mode-group {
            min-width: 290px;
        }
        .calendar-type-native {
            position: absolute;
            width: 1px;
            height: 1px;
            overflow: hidden;
            clip-path: inset(50%);
            opacity: 0;
            pointer-events: none;
        }
        .calendar-mode-tabs {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            padding: 4px;
            border: 1px solid var(--border);
            border-radius: 13px;
            background: var(--bg-dark);
        }
        .calendar-mode-tabs button {
            padding: 9px 14px;
            border: 0;
            border-radius: 9px;
            background: transparent;
            color: var(--text-secondary);
            font: inherit;
            cursor: pointer;
            transition: .2s ease;
        }
        .calendar-mode-tabs button.active {
            background: linear-gradient(135deg, #ba9852, #d5b56c);
            color: #0b1018;
            font-weight: 700;
            box-shadow: 0 6px 18px rgba(204, 169, 96, .2);
        }
        .four-pillars-input {
            margin: 4px 0 20px;
            padding: 20px;
            border: 1px solid rgba(205, 170, 96, .24);
            border-radius: 16px;
            background:
                radial-gradient(circle at 50% 0%, rgba(205, 170, 96, .08), transparent 45%),
                rgba(6, 12, 22, .52);
        }
        .four-pillars-heading,
        .four-pillars-result-head {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 16px;
        }
        .four-pillars-heading > div {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }
        .four-pillars-heading strong {
            color: #f0e2be;
            font-size: 16px;
        }
        .four-pillars-heading span,
        .four-pillars-results p,
        .four-pillars-result-head span {
            color: var(--text-muted);
            font-size: 11px;
            line-height: 1.6;
        }
        .four-pillars-range {
            flex: 0 0 auto;
            padding: 5px 9px;
            border: 1px solid rgba(205, 170, 96, .2);
            border-radius: 999px;
            color: #cdb57c !important;
        }
        .four-pillars-selector {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 16px;
            margin-top: 22px;
        }
        .four-pillar-column {
            display: grid;
            justify-items: center;
            gap: 10px;
        }
        .four-pillar-column > strong {
            color: #dce5eb;
            font-size: 13px;
        }
        .four-pillar-column label {
            position: relative;
        }
        .four-pillar-column label > span {
            position: absolute;
            width: 1px;
            height: 1px;
            overflow: hidden;
            clip-path: inset(50%);
        }
        .four-pillar-column select {
            width: 68px;
            height: 68px;
            appearance: none;
            border: 1px solid rgba(123, 176, 194, .28);
            border-radius: 50%;
            background: rgba(17, 29, 43, .9);
            color: #f4f7f9;
            text-align: center;
            text-align-last: center;
            font-family: "Noto Serif SC", "Songti SC", serif;
            font-size: 28px;
            font-weight: 700;
            cursor: pointer;
            box-shadow: inset 0 0 20px rgba(85, 155, 181, .05);
        }
        .four-pillar-column select:focus {
            outline: none;
            border-color: #d0aa5e;
            box-shadow: 0 0 0 3px rgba(208, 170, 94, .12);
        }
        .four-pillars-results:not(:empty) {
            margin-top: 20px;
            padding-top: 16px;
            border-top: 1px solid rgba(148, 163, 184, .12);
        }
        .four-pillars-result-head strong {
            color: #e8c980;
        }
        .four-pillars-match-list {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 8px;
            margin-top: 12px;
        }
        .four-pillars-match-list button {
            display: flex;
            flex-direction: column;
            gap: 4px;
            padding: 11px 13px;
            border: 1px solid rgba(105, 174, 195, .2);
            border-radius: 10px;
            background: rgba(13, 24, 38, .86);
            color: #dbe7ed;
            text-align: left;
            cursor: pointer;
        }
        .four-pillars-match-list button:hover {
            border-color: #d0aa5e;
            transform: translateY(-1px);
        }
        .four-pillars-match-list span,
        .four-pillars-empty span,
        .four-pillars-loading {
            color: var(--text-muted);
            font-size: 10px;
        }
        .four-pillars-empty {
            display: flex;
            flex-direction: column;
            gap: 5px;
            color: #e8c980;
        }

        @media (max-width: 620px) {
            .calendar-mode-group { min-width: 0; }
            .four-pillars-heading { flex-direction: column; }
            .four-pillars-selector { gap: 8px; }
            .four-pillar-column select {
                width: 58px;
                height: 58px;
                font-size: 24px;
            }
            .four-pillars-match-list { grid-template-columns: 1fr; }
        }

        /* ========== 结果面板 ========== */
        .result-panel {
            display: none;
            overflow: hidden;
            padding: 26px;
            border: 1px solid rgba(102, 150, 186, 0.2);
            border-radius: 20px;
            background:
                radial-gradient(circle at 88% 2%, rgba(212, 168, 77, 0.08), transparent 26%),
                radial-gradient(circle at 8% 12%, rgba(42, 139, 175, 0.1), transparent 32%),
                linear-gradient(155deg, rgba(18, 27, 44, 0.98), rgba(8, 13, 23, 0.98));
            box-shadow: 0 28px 80px rgba(0, 0, 0, 0.24);
        }
        .result-panel.show { display: block; animation: fadeIn 0.3s ease; }

        /* 标题信息 */
        .bazi-header-info {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 24px;
            margin-bottom: 22px;
            padding: 8px 4px 22px;
            border-bottom: 1px solid rgba(148, 163, 184, 0.13);
        }
        .bazi-header-copy { min-width: 0; }
        .bazi-header-kicker {
            margin-bottom: 5px;
            color: #6faabd;
            font-size: 9px;
            font-weight: 700;
            letter-spacing: .18em;
        }
        .bazi-title {
            margin-bottom: 7px;
            color: #f1f5f8;
            font-family: "Noto Serif SC", "Songti SC", serif;
            font-size: 26px;
            font-weight: 700;
            letter-spacing: .08em;
        }
        .bazi-subtitle {
            max-width: 780px;
            color: var(--text-secondary);
            font-size: 12px;
            line-height: 1.8;
        }
        .bazi-header-seal {
            display: grid;
            flex: 0 0 auto;
            width: 68px;
            height: 68px;
            place-content: center;
            border: 1px solid rgba(215, 173, 84, 0.42);
            border-radius: 18px 5px 18px 5px;
            background: rgba(181, 128, 32, 0.07);
            color: #d9b45d;
            text-align: center;
            box-shadow: inset 0 0 24px rgba(201, 151, 51, 0.06);
        }
        .bazi-header-seal span {
            font-family: "Noto Serif SC", "Songti SC", serif;
            font-size: 24px;
            line-height: 1;
        }
        .bazi-header-seal small {
            margin-top: 5px;
            font-size: 8px;
            letter-spacing: .18em;
        }
        .result-panel .bazi-section,
        .result-panel .dayun-section {
            margin-top: 16px;
            padding: 20px;
            border: 1px solid rgba(148, 163, 184, 0.13);
            border-radius: 16px;
            background: rgba(5, 11, 21, 0.34);
        }
        .result-panel .section-title {
            position: relative;
            padding: 0 0 11px 14px;
            border-color: rgba(148, 163, 184, 0.12);
            color: #e9eef3;
            font-size: 14px;
            letter-spacing: .05em;
        }
        .result-panel .section-title::before {
            position: absolute;
            top: 3px;
            bottom: 13px;
            left: 0;
            width: 3px;
            border-radius: 999px;
            background: linear-gradient(#70bdd3, #d6ad55);
            content: "";
        }

        /* 分区标题 */
        .section-title {
            font-size: 15px;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 14px;
            padding-bottom: 8px;
            border-bottom: 1px solid var(--border);
        }

        /* 八字表格 */
        .bazi-table-wrapper { overflow-x: auto; }
        .bazi-table {
            width: 100%;
            border-collapse: collapse;
            background: var(--bg-dark);
            border-radius: 12px;
            overflow: hidden;
        }
        .bazi-table th, .bazi-table td {
            padding: 12px 8px;
            text-align: center;
            border: 1px solid var(--border);
            min-width: 80px;
        }
        .bazi-table th {
            background: rgba(30, 136, 229, 0.1);
            color: var(--text-secondary);
            font-weight: 500;
            font-size: 13px;
        }
        .bazi-table td:first-child {
            background: rgba(30, 136, 229, 0.05);
            color: var(--text-muted);
            font-size: 13px;
        }
        .gan-cell, .zhi-cell { font-size: 32px; font-weight: 700; }
        .canggan-cell { font-size: 14px; line-height: 1.8; }
        .info-cell { font-size: 11px; line-height: 1.5; color: var(--text-secondary); }

        /* 高级四柱命盘卡 */
        .natal-chart {
            min-width: 920px;
        }
        .natal-chart-intro {
            display: flex;
            align-items: flex-end;
            justify-content: space-between;
            gap: 18px;
            margin-bottom: 13px;
            padding: 0 2px;
        }
        .natal-chart-intro > div {
            display: flex;
            flex-direction: column;
            gap: 3px;
        }
        .natal-chart-intro span {
            color: #75b6ca;
            font-size: 9px;
            letter-spacing: .12em;
        }
        .natal-chart-intro strong {
            color: #e7edf2;
            font-size: 13px;
            font-weight: 600;
            letter-spacing: .08em;
        }
        .natal-chart-intro p {
            margin: 0;
            color: var(--text-muted);
            font-size: 9px;
        }
        .natal-table {
            width: 100%;
            overflow: hidden;
            border: 1px solid rgba(119, 158, 181, 0.2);
            border-spacing: 0;
            border-radius: 15px;
            background: rgba(6, 12, 22, 0.64);
            table-layout: fixed;
        }
        .natal-table th,
        .natal-table td {
            position: relative;
            padding: 11px 10px;
            border-right: 1px solid rgba(148, 163, 184, 0.1);
            border-bottom: 1px solid rgba(148, 163, 184, 0.1);
            text-align: center;
            vertical-align: middle;
        }
        .natal-table tr > *:last-child {
            border-right: 0;
        }
        .natal-table tbody tr:last-child > * {
            border-bottom: 0;
        }
        .natal-table thead th {
            background:
                linear-gradient(180deg, rgba(84, 147, 171, 0.09), rgba(84, 147, 171, 0.025));
        }
        .natal-table .natal-row-head {
            width: 76px;
            background: rgba(75, 111, 133, 0.055);
            color: #6f8092;
            font-family: "Noto Serif SC", "Songti SC", serif;
            font-size: 10px;
            font-weight: 500;
            letter-spacing: .12em;
        }
        .natal-table .is-day-column {
            background: rgba(196, 148, 47, 0.045);
        }
        .natal-table thead .is-day-column {
            background:
                linear-gradient(180deg, rgba(207, 158, 55, 0.13), rgba(207, 158, 55, 0.035));
        }
        .natal-table .is-day-column::after {
            position: absolute;
            top: 0;
            right: 0;
            left: 0;
            height: 1px;
            background: linear-gradient(90deg, transparent, rgba(220, 177, 83, 0.42), transparent);
            content: "";
        }
        .natal-pillar-header {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 3px;
        }
        .natal-pillar-header > span {
            color: #60889b;
            font: 700 7px/1 monospace;
        }
        .natal-pillar-header > strong {
            color: #eef3f6;
            font-family: "Noto Serif SC", "Songti SC", serif;
            font-size: 14px;
            letter-spacing: .08em;
        }
        .natal-pillar-header > small {
            color: var(--text-muted);
            font-size: 8px;
            font-weight: 400;
        }
        .natal-role-badge {
            display: inline-block;
            padding: 4px 11px;
            border: 1px solid rgba(103, 177, 201, 0.24);
            border-radius: 999px;
            background: rgba(103, 177, 201, 0.06);
            color: #a8d4e1;
            font-family: inherit;
            font-size: 13px;
            font-weight: 700;
            letter-spacing: .02em;
        }
        .is-day-column .natal-role-badge {
            border-color: rgba(218, 174, 79, 0.34);
            background: rgba(218, 174, 79, 0.07);
            color: #e5bf68;
        }
        .natal-table .natal-major-row > * {
            padding-top: 13px;
            padding-bottom: 13px;
        }
        .natal-symbol-cell > strong {
            display: block;
            font-family: "Noto Serif SC", "Songti SC", serif;
            font-size: 38px;
            font-weight: 700;
            line-height: 1;
            text-shadow: 0 7px 22px color-mix(in srgb, currentColor 32%, transparent);
        }
        .natal-symbol-cell > small {
            display: block;
            margin-top: 5px;
            color: #647487;
            font-size: 8px;
            font-weight: 400;
        }
        .natal-hidden-stack {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
            min-height: 22px;
        }
        .natal-hidden-stack > span {
            font-family: "Noto Serif SC", "Songti SC", serif;
            font-size: 13px;
            font-weight: 600;
            line-height: 1.25;
        }
        .natal-hidden-stack.role-stack > span {
            color: #cbd6de;
            font-family: inherit;
            font-size: 13px;
            font-weight: 650;
        }
        .natal-table .natal-stage-row > * {
            padding-top: 9px;
            padding-bottom: 9px;
            background-color: rgba(92, 143, 163, 0.025);
        }
        .natal-stage-pill {
            display: inline-block;
            min-width: 58px;
            padding: 5px 10px;
            border: 1px solid currentColor;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.018);
            font-family: "Noto Serif SC", "Songti SC", serif;
            font-size: 11px;
            font-weight: 600;
            letter-spacing: .05em;
        }
        .natal-plain-value {
            color: #aeb9c4;
            font-family: "Noto Serif SC", "Songti SC", serif;
            font-size: 11px;
        }
        .natal-table .natal-shensha-row td {
            vertical-align: top;
        }
        .natal-table-shensha {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 4px;
        }
        .natal-table-shensha > span {
            padding: 4px 8px;
            border: 1px solid currentColor;
            border-radius: 999px;
            font-size: 11px;
            font-weight: 600;
            line-height: 1.25;
            white-space: nowrap;
        }
        .natal-table-shensha .tier-core { color: #d9b55e; }
        .natal-table-shensha .tier-common { color: #5ac69c; }
        .natal-table-shensha .tier-auxiliary { color: #91a0b2; }
        .natal-table-shensha .empty {
            border: 0;
            color: var(--text-muted);
        }
        .natal-chart-grid {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 10px;
        }
        .natal-pillar-card {
            --pillar-accent: #69aec3;
            position: relative;
            overflow: hidden;
            padding: 16px;
            border: 1px solid color-mix(in srgb, var(--pillar-accent) 24%, transparent);
            border-radius: 15px;
            background:
                radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--pillar-accent) 10%, transparent), transparent 42%),
                linear-gradient(165deg, rgba(18, 27, 43, 0.9), rgba(7, 13, 23, 0.88));
            box-shadow: 0 12px 28px rgba(0, 0, 0, 0.13);
        }
        .natal-pillar-card::before {
            position: absolute;
            inset: 0 0 auto;
            height: 2px;
            background: linear-gradient(90deg, var(--pillar-accent), transparent 80%);
            content: "";
        }
        .natal-pillar-card.is-day-pillar {
            --pillar-accent: #d7ad54;
            border-color: rgba(215, 173, 84, 0.35);
            box-shadow: 0 14px 34px rgba(151, 108, 27, 0.08);
        }
        .natal-pillar-head {
            display: grid;
            grid-template-columns: auto 1fr auto;
            align-items: center;
            gap: 8px;
        }
        .pillar-index {
            display: grid;
            width: 27px;
            height: 27px;
            place-items: center;
            border: 1px solid color-mix(in srgb, var(--pillar-accent) 30%, transparent);
            border-radius: 8px;
            color: var(--pillar-accent);
            font: 700 8px/1 monospace;
        }
        .natal-pillar-head > div:nth-child(2) {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }
        .natal-pillar-head strong {
            color: #f0f4f7;
            font-size: 13px;
        }
        .natal-pillar-head span {
            color: var(--text-muted);
            font-size: 8px;
        }
        .natal-pillar-head em {
            padding: 3px 7px;
            border: 1px solid color-mix(in srgb, var(--pillar-accent) 34%, transparent);
            border-radius: 999px;
            color: var(--pillar-accent);
            font-size: 9px;
            font-style: normal;
            white-space: nowrap;
        }
        .natal-symbol-pair {
            display: grid;
            grid-template-columns: 1fr 25px 1fr;
            align-items: center;
            margin: 18px 0 15px;
        }
        .natal-symbol-pair > div:not(.natal-symbol-axis) {
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        .natal-symbol-pair > div > span {
            color: var(--text-muted);
            font-size: 8px;
            letter-spacing: .1em;
        }
        .natal-symbol-pair > div > strong {
            margin-top: 5px;
            font-family: "Noto Serif SC", "Songti SC", serif;
            font-size: 39px;
            line-height: 1;
            text-shadow: 0 8px 22px currentColor;
        }
        .natal-symbol-pair > div > small {
            margin-top: 5px;
            color: var(--text-muted);
            font-size: 8px;
        }
        .natal-symbol-axis {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
        }
        .natal-symbol-axis i {
            width: 1px;
            height: 14px;
            background: linear-gradient(transparent, rgba(148, 163, 184, 0.3));
        }
        .natal-symbol-axis i:last-child {
            background: linear-gradient(rgba(148, 163, 184, 0.3), transparent);
        }
        .natal-symbol-axis span {
            color: #536274;
            font-size: 7px;
            writing-mode: vertical-rl;
        }
        .natal-card-block {
            min-height: 78px;
            padding: 10px;
            border: 1px solid rgba(148, 163, 184, 0.09);
            border-radius: 9px;
            background: rgba(255, 255, 255, 0.018);
        }
        .natal-block-label {
            color: var(--text-muted);
            font-size: 8px;
            letter-spacing: .06em;
        }
        .hidden-stem-list {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 4px;
            margin-top: 8px;
        }
        .hidden-stem-list > span {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 2px;
            min-width: 0;
        }
        .hidden-stem-list b {
            font-size: 14px;
        }
        .hidden-stem-list small {
            overflow: hidden;
            max-width: 100%;
            color: #8e9bab;
            font-size: 8px;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .changsheng-pair {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 6px;
            margin-top: 8px;
        }
        .changsheng-pair > div {
            padding: 8px;
            border: 1px solid currentColor;
            border-radius: 9px;
            background: rgba(255, 255, 255, 0.015);
        }
        .changsheng-pair span,
        .changsheng-pair strong,
        .changsheng-pair small {
            display: block;
        }
        .changsheng-pair span {
            opacity: .72;
            font-size: 8px;
        }
        .changsheng-pair strong {
            margin-top: 3px;
            color: #eef3f6;
            font-size: 13px;
        }
        .changsheng-pair small {
            margin-top: 2px;
            opacity: .62;
            font-size: 7px;
        }
        .stage-growth { color: #58c89b; }
        .stage-strong { color: #d9b35f; }
        .stage-change { color: #69b9d1; }
        .stage-store { color: #aa95ce; }
        .natal-meta-grid {
            display: grid;
            grid-template-columns: .8fr 1.2fr;
            gap: 6px;
            margin-top: 8px;
        }
        .natal-meta-grid > div {
            padding: 7px 8px;
            border: 1px solid rgba(148, 163, 184, 0.08);
            border-radius: 8px;
        }
        .natal-meta-grid span,
        .natal-meta-grid strong {
            display: block;
        }
        .natal-meta-grid span {
            color: var(--text-muted);
            font-size: 7px;
        }
        .natal-meta-grid strong {
            margin-top: 3px;
            overflow: hidden;
            color: #bdc7d1;
            font-size: 9px;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .pillar-shensha {
            margin-top: 10px;
            padding-top: 9px;
            border-top: 1px solid rgba(148, 163, 184, 0.09);
        }
        .pillar-shensha-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 4px;
            margin-top: 6px;
        }
        .pillar-shensha-tags > span {
            padding: 2px 6px;
            border: 1px solid currentColor;
            border-radius: 999px;
            font-size: 7px;
        }
        .pillar-shensha-tags .tier-core { color: #d9b55e; }
        .pillar-shensha-tags .tier-common { color: #5ac69c; }
        .pillar-shensha-tags .tier-auxiliary { color: #91a0b2; }
        .pillar-shensha-tags .empty {
            border: 0;
            color: var(--text-muted);
        }
        .pillar-shensha details {
            margin-top: 6px;
            color: var(--text-muted);
            font-size: 8px;
        }
        .pillar-shensha summary {
            cursor: pointer;
        }
        .changsheng-note {
            margin-top: 10px;
            padding: 10px 12px;
            border: 1px solid rgba(148, 163, 184, 0.1);
            border-radius: 9px;
            color: var(--text-muted);
            font-size: 9px;
            line-height: 1.6;
        }
        .changsheng-note summary { cursor: pointer; }
        .changsheng-note > div { margin-top: 7px; color: #aeb9c4; }
        .changsheng-note p { margin: 3px 0 0; }

        /* 五行颜色 */
        .wx-wood { color: var(--wood); }
        .wx-fire { color: var(--fire); }
        .wx-earth { color: var(--earth); }
        .wx-metal { color: var(--metal); }
        .wx-water { color: var(--water); }

        .wx-icon {
            display: inline-block;
            width: 8px;
            height: 8px;
            border-radius: 50%;
            margin-right: 6px;
        }
        .wx-icon-wood { background: var(--wood); }
        .wx-icon-fire { background: var(--fire); }
        .wx-icon-earth { background: var(--earth); }
        .wx-icon-metal { background: var(--metal); }
        .wx-icon-water { background: var(--water); }

        /* 基础信息网格 */
        .info-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
            gap: 12px;
        }
        .info-item {
            position: relative;
            overflow: hidden;
            min-height: 84px;
            padding: 15px;
            border: 1px solid rgba(148, 163, 184, 0.12);
            border-radius: 12px;
            background:
                linear-gradient(145deg, rgba(72, 131, 154, 0.04), transparent 60%),
                rgba(7, 13, 24, 0.65);
            text-align: left;
        }
        .info-item::after {
            position: absolute;
            right: -12px;
            bottom: -22px;
            width: 58px;
            height: 58px;
            border: 1px solid rgba(105, 174, 195, 0.08);
            border-radius: 50%;
            content: "";
        }
        .info-label {
            margin-bottom: 7px;
            color: #6f8093;
            font-size: 9px;
            letter-spacing: .08em;
        }
        .info-value {
            position: relative;
            z-index: 1;
            color: #dce4ea;
            font-size: 13px;
            font-weight: 600;
            line-height: 1.45;
        }
        .info-value small {
            color: var(--text-muted);
            font-size: 8px;
            font-weight: 400;
        }

        /* 五行雷达图 */
        .wuxing-section {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 24px;
            align-items: center;
        }
        .wuxing-chart-container { max-width: 260px; margin: 0 auto; }
        .wuxing-legend {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
        }
        .legend-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 14px;
            background: var(--bg-dark);
            border-radius: 10px;
            border: 1px solid var(--border);
        }
        .legend-dot { width: 14px; height: 14px; border-radius: 50%; }
        .legend-text { font-size: 14px; }
        .legend-count { margin-left: auto; font-size: 16px; font-weight: 700; }

        /* 大运流年 */
        .dayun-section { margin-top: 24px; }
        .dayun-scroll {
            overflow-x: auto;
            padding-bottom: 8px;
            -webkit-overflow-scrolling: touch;
        }
        .dayun-list {
            display: flex;
            gap: 12px;
            min-width: max-content;
        }
        .dayun-item {
            min-width: 90px;
            padding: 14px;
            background: var(--bg-dark);
            border-radius: 12px;
            text-align: center;
            border: 1px solid var(--border);
            cursor: pointer;
            transition: all 0.2s;
        }
        .dayun-item:hover { border-color: var(--primary); transform: translateY(-2px); }
        .dayun-item.current { border-color: var(--primary); background: rgba(30, 136, 229, 0.15); }
        .dayun-year { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
        .dayun-ganzhi { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
        .dayun-sui { font-size: 11px; color: var(--text-secondary); }
        
        /* 流年网格 */
        .liunian-grid {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 10px;
            margin-top: 12px;
        }
        .liunian-item {
            padding: 10px;
            background: var(--bg-dark);
            border-radius: 10px;
            text-align: center;
            border: 1px solid var(--border);
            cursor: pointer;
            transition: all 0.2s;
        }
        .liunian-item:hover { border-color: var(--primary); }
        .liunian-item.current { border-color: var(--primary); background: rgba(30, 136, 229, 0.15); }
        .liunian-year { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
        .liunian-ganzhi { font-size: 14px; font-weight: 600; }
        .liunian-shishen { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }

        /* 命盘综合信息 */
        .extra-info {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 12px;
            margin-top: 24px;
        }
        .extra-item {
            background: var(--bg-dark);
            padding: 14px;
            border-radius: 12px;
            border: 1px solid var(--border);
        }
        .extra-label { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
        .extra-value { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

        /* ========== 八字分析页面 ========== */
        .analysis-layout {
            display: flex;
            gap: 20px;
            min-height: 600px;
        }

        /* 左侧菜单 */
        .sidebar {
            width: 220px;
            flex-shrink: 0;
            background: var(--bg-card);
            border-radius: 16px;
            padding: 16px;
            border: 1px solid var(--border);
        }
        .sidebar-menu {
            list-style: none;
        }
        .menu-item {
            padding: 14px 16px;
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.2s;
            font-size: 14px;
            color: var(--text-secondary);
            margin-bottom: 4px;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .menu-item:hover {
            background: var(--bg-card-hover);
            color: var(--text-primary);
        }
        .menu-item.active {
            background: linear-gradient(135deg, rgba(30, 136, 229, 0.2), rgba(30, 136, 229, 0.1));
            color: var(--primary-light);
            border-left: 3px solid var(--primary);
        }
        .menu-icon { font-size: 18px; width: 24px; text-align: center; }
        
        /* 侧边栏子菜单样式 */
        .sidebar-section {
            margin-bottom: 16px;
            padding-bottom: 12px;
            border-bottom: 1px solid var(--border);
        }
        .sidebar-section-title {
            font-size: 11px;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 8px;
            padding-left: 16px;
        }
        .menu-item.new-section {
            margin-top: 8px;
        }

        /* 右侧内容区 */
        .content-area {
            flex: 1;
            background: var(--bg-card);
            border-radius: 16px;
            padding: 24px;
            border: 1px solid var(--border);
            overflow-y: auto;
            max-height: 80vh;
        }

        /* 内容区各维度 */
        .analysis-section {
            display: none;
            animation: fadeIn 0.3s ease;
        }
        .analysis-section.active {
            display: block;
        }

        /* 八字概览 */
        .overview-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 16px;
        }
        .overview-card {
            background: var(--bg-dark);
            padding: 20px;
            border-radius: 12px;
            border: 1px solid var(--border);
        }
        .overview-card-title {
            font-size: 13px;
            color: var(--text-muted);
            margin-bottom: 12px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .overview-card-value {
            font-size: 20px;
            font-weight: 700;
            color: var(--primary-light);
        }
        .overview-card-sub {
            font-size: 12px;
            color: var(--text-secondary);
            margin-top: 6px;
        }

        /* 八字概览表格 */
        .bazi-overview-table-wrapper {
            overflow-x: auto;
            margin: 16px 0;
            -webkit-overflow-scrolling: touch;
        }
        .bazi-overview-table {
            width: 100%;
            border-collapse: collapse;
            background: var(--bg-dark);
            border-radius: 12px;
            overflow: hidden;
            min-width: 500px;
        }
        .bazi-overview-table th, .bazi-overview-table td {
            padding: 14px 12px;
            text-align: center;
            border: 1px solid var(--border);
            min-width: 90px;
        }
        .bazi-overview-table th {
            background: rgba(30, 136, 229, 0.12);
            color: var(--text-secondary);
            font-weight: 500;
            font-size: 13px;
        }
        .bazi-overview-table td:first-child {
            background: rgba(30, 136, 229, 0.06);
            color: var(--text-muted);
            font-size: 12px;
            font-weight: 500;
        }
        .bazi-overview-table .gan-cell { font-size: 28px; font-weight: 700; }
        .bazi-overview-table .zhi-cell { font-size: 28px; font-weight: 700; }
        .bazi-overview-table .shishen-cell { font-size: 13px; color: var(--primary-light); font-weight: 500; }
        .bazi-overview-table .canggan-cell { font-size: 13px; line-height: 1.8; }
        .bazi-overview-table .canggan-shishen { font-size: 11px; color: var(--text-secondary); line-height: 1.6; }
        .changsheng-overview-row td {
            background: rgba(101, 164, 188, 0.035);
        }
        .changsheng-overview-row td > span {
            display: inline-block;
            min-width: 48px;
            padding: 4px 8px;
            border: 1px solid rgba(109, 176, 199, 0.2);
            border-radius: 999px;
            background: rgba(109, 176, 199, 0.06);
            color: #a9d2df;
            font-size: 11px;
        }

        /* 天干地支生克刑冲合害卡片 */
        .liuyi-cards {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 16px;
            margin: 20px 0;
        }
        .liuyi-card {
            background: var(--bg-dark);
            padding: 18px;
            border-radius: 12px;
            border: 1px solid var(--border);
        }
        .liuyi-title {
            font-size: 14px;
            font-weight: 600;
            color: var(--primary-light);
            margin-bottom: 12px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .liuyi-content {
            font-size: 13px;
            color: var(--text-secondary);
            line-height: 1.8;
            word-break: break-word;
        }
        .liuyi-tag {
            display: inline-block;
            padding: 3px 8px;
            background: rgba(30, 136, 229, 0.1);
            border-radius: 6px;
            margin: 2px;
            font-size: 12px;
            color: var(--text-primary);
        }
        /* 天干地支作用关系颜色 */
        .relation-sheng { color: #4caf50; } /* 绿色-相生 */
        .relation-ke { color: #f44336; } /* 红色-相克 */
        .relation-chong { color: #f44336; } /* 红色-相冲 */
        .relation-he { color: #4caf50; } /* 绿色-相合 */
        .relation-xing { color: #ff9800; } /* 橙色-相刑 */
        .relation-hai { color: #9c27b0; } /* 紫色-相害 */
        .relation-po { color: #ec4899; }
        .relation-banhe { color: #22c55e; }
        .relation-gonghe { color: #14b8a6; }
        .relation-same { color: #94a3b8; }
        .relation-group {
            display: grid;
            grid-template-columns: 48px minmax(0, 1fr);
            gap: 8px;
            padding: 8px 0;
            border-bottom: 1px solid rgba(148, 163, 184, 0.12);
        }
        .relation-group:last-child { border-bottom: 0; }
        .relation-group-label {
            color: var(--text-muted);
            font-size: 11px;
            font-weight: 600;
            padding-top: 3px;
        }
        .relation-group-items {
            display: grid;
            gap: 7px;
            min-width: 0;
        }
        .relation-detail {
            padding-left: 9px;
            border-left: 2px solid currentColor;
        }
        .relation-main {
            color: currentColor;
            font-size: 12px;
            font-weight: 600;
            line-height: 1.5;
        }
        .relation-explanation {
            margin-top: 2px;
            color: var(--text-muted);
            font-size: 11px;
            line-height: 1.55;
        }
        .flow-relation-chip {
            display: inline-block;
            margin: 4px;
            padding: 4px 10px;
            border: 1px solid currentColor;
            border-radius: 999px;
            background: rgba(148, 163, 184, 0.08);
            font-size: 11px;
        }

        /* 四柱展示 */
        .sizhu-display {
            display: flex;
            justify-content: center;
            gap: 20px;
            margin: 20px 0;
        }
        .sizhu-item {
            text-align: center;
            padding: 16px 24px;
            background: var(--bg-dark);
            border-radius: 12px;
            border: 1px solid var(--border);
        }
        .sizhu-label { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
        .sizhu-ganzhi { font-size: 28px; font-weight: 700; }

        /* 十神格局 */
        .shishen-grid {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 10px;
            margin-bottom: 20px;
        }
        .shishen-item {
            background: var(--bg-dark);
            padding: 14px;
            border-radius: 10px;
            text-align: center;
            border: 1px solid var(--border);
        }
        .shishen-label { font-size: 11px; color: var(--text-muted); margin-bottom: 6px; }
        .shishen-value { font-size: 18px; font-weight: 700; }
        .shishen-chart-container {
            width: 100%;
            height: 440px;
            margin: 18px auto 6px;
            padding: 18px 20px 14px;
            border: 1px solid rgba(148, 163, 184, .14);
            border-radius: 14px;
            background: rgba(6, 12, 22, .48);
        }
        .shishen-chart-title {
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            gap: 10px;
            margin-top: 22px;
            font-size: 15px;
        }
        .shishen-chart-title small {
            color: var(--text-muted);
            font-size: 10px;
            font-weight: 400;
        }

        /* 五行流通 */
        .wuxing-flow {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
        }
        .flow-card {
            background: var(--bg-dark);
            padding: 20px;
            border-radius: 12px;
            border: 1px solid var(--border);
        }
        .flow-title {
            font-size: 14px;
            color: var(--primary-light);
            margin-bottom: 12px;
            font-weight: 600;
        }
        .flow-content {
            font-size: 13px;
            color: var(--text-secondary);
            line-height: 1.8;
        }
        .balance-suggestion {
            background: rgba(30, 136, 229, 0.1);
            padding: 16px;
            border-radius: 10px;
            margin-top: 12px;
        }

        .pillar-flow-main {
            margin-bottom: 20px;
            padding: 20px;
            overflow: hidden;
            border-color: rgba(56, 189, 248, 0.24);
            background:
                radial-gradient(circle at 50% 0, rgba(30, 136, 229, 0.08), transparent 46%),
                var(--bg-dark);
        }
        .pillar-flow-legend {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin: -2px 0 14px;
        }
        .flow-nature {
            padding: 3px 8px;
            border: 1px solid currentColor;
            border-radius: 999px;
            font-size: 10px;
        }
        .flow-nature.flow { color: #22c55e; }
        .flow-nature.support { color: #38bdf8; }
        .flow-nature.block { color: #f97316; }
        .pillar-board-scroll {
            overflow-x: auto;
            padding: 3px 1px 9px;
            scrollbar-width: thin;
        }
        .pillar-position-board {
            min-width: 880px;
            padding: 14px;
            border: 1px solid rgba(148, 163, 184, 0.12);
            border-radius: 12px;
            background: rgba(2, 8, 23, 0.28);
        }
        .pillar-board-row {
            display: grid;
            grid-template-columns:
                42px 104px minmax(118px, 1fr)
                104px minmax(118px, 1fr)
                104px minmax(118px, 1fr) 104px;
            align-items: center;
            min-height: 76px;
        }
        .pillar-board-row.header {
            min-height: 31px;
        }
        .pillar-board-row.vertical {
            min-height: 63px;
        }
        .pillar-layer-label {
            color: var(--text-muted);
            font-size: 10px;
            font-weight: 600;
            letter-spacing: 0.12em;
        }
        .pillar-board-header {
            color: var(--text-secondary);
            font-size: 12px;
            font-weight: 600;
            text-align: center;
        }
        .pillar-flow-node {
            width: 76px;
            min-height: 60px;
            justify-self: center;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            border: 1px solid color-mix(in srgb, var(--node-color) 62%, transparent);
            border-radius: 13px;
            background: color-mix(in srgb, var(--node-color) 11%, var(--bg-card));
            box-shadow: inset 0 0 20px color-mix(in srgb, var(--node-color) 6%, transparent);
        }
        .pillar-flow-node strong {
            color: var(--node-color);
            font-size: 25px;
            line-height: 1;
        }
        .pillar-flow-node span {
            margin-top: 6px;
            color: var(--text-muted);
            font-size: 9px;
        }
        .pillar-horizontal-edge {
            min-width: 0;
            padding: 5px 8px;
            border-radius: 9px;
            text-align: center;
        }
        .pillar-horizontal-edge b {
            display: block;
            font-size: 26px;
            line-height: 0.8;
        }
        .pillar-horizontal-edge span {
            display: block;
            margin-top: 5px;
            overflow: hidden;
            color: var(--text-secondary);
            font-size: 10px;
            line-height: 1.35;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .pillar-horizontal-edge small {
            display: block;
            margin-top: 3px;
            color: currentColor;
            font-size: 9px;
            line-height: 1.35;
        }
        .pillar-horizontal-edge.flow,
        .pillar-vertical-edge.flow { color: #22c55e; }
        .pillar-horizontal-edge.support,
        .pillar-vertical-edge.support { color: #38bdf8; }
        .pillar-horizontal-edge.block,
        .pillar-vertical-edge.block { color: #f97316; }
        .pillar-vertical-edge {
            justify-self: center;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 2px;
            min-width: 64px;
            padding: 4px 7px;
            border: 1px solid color-mix(in srgb, currentColor 32%, transparent);
            border-radius: 9px;
            background: rgba(148, 163, 184, 0.04);
        }
        .pillar-vertical-edge b {
            font-size: 22px;
            line-height: 1;
        }
        .pillar-vertical-edge span {
            color: var(--text-secondary);
            font-size: 10px;
        }
        .boundary-status-grid {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 8px;
            margin-top: 12px;
        }
        .boundary-status {
            display: grid;
            grid-template-columns: 1fr auto;
            gap: 3px 8px;
            padding: 9px 11px;
            border: 1px solid var(--border);
            border-radius: 9px;
            background: rgba(148, 163, 184, 0.04);
        }
        .boundary-status span {
            color: var(--text-muted);
            font-size: 10px;
        }
        .boundary-status strong {
            font-size: 11px;
        }
        .boundary-status small {
            grid-column: 1 / -1;
            color: var(--text-muted);
            font-size: 9px;
        }
        .boundary-status.flow strong { color: #22c55e; }
        .boundary-status.mixed strong { color: #f59e0b; }
        .boundary-status.block strong { color: #ef4444; }
        .pillar-flow-summary {
            display: flex;
            align-items: flex-start;
            gap: 11px;
            margin-top: 12px;
            padding: 12px 14px;
            border-left: 3px solid #38bdf8;
            border-radius: 0 9px 9px 0;
            background: rgba(56, 189, 248, 0.07);
        }
        .pillar-flow-summary strong {
            flex: 0 0 auto;
            color: #7dd3fc;
            font-size: 13px;
        }
        .pillar-flow-summary span {
            color: var(--text-secondary);
            font-size: 11px;
            line-height: 1.65;
        }
        .cross-relation-panel {
            margin-top: 13px;
            padding-top: 12px;
            border-top: 1px solid var(--border);
        }
        .cross-relation-title {
            margin-bottom: 8px;
            color: var(--text-muted);
            font-size: 10px;
            font-weight: 600;
        }
        .cross-relation-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 7px;
        }
        .cross-relation-item {
            display: grid;
            gap: 3px;
            padding: 8px 10px;
            border: 1px solid var(--border);
            border-radius: 8px;
            background: rgba(148, 163, 184, 0.04);
        }
        .cross-relation-item span {
            color: var(--text-muted);
            font-size: 9px;
        }
        .cross-relation-item strong {
            color: var(--text-secondary);
            font-size: 10px;
            line-height: 1.45;
        }
        .cross-relation-item.relation-chong,
        .cross-relation-item.relation-xing,
        .cross-relation-item.relation-hai,
        .cross-relation-item.relation-po {
            border-color: rgba(249, 115, 22, 0.26);
        }
        .cross-relation-item.relation-sheng,
        .cross-relation-item.relation-he,
        .cross-relation-item.relation-sanhe,
        .cross-relation-item.relation-sanhui {
            border-color: rgba(34, 197, 94, 0.24);
        }
        .pillar-flow-note {
            margin-top: 11px;
            color: var(--text-muted);
            font-size: 10px;
            line-height: 1.65;
        }

        .wuxing-flow-main {
            margin-bottom: 20px;
            padding: 20px;
            overflow: hidden;
        }
        .flow-legend {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            margin: -2px 0 16px;
            color: var(--text-muted);
            font-size: 11px;
        }
        .flow-legend span {
            display: inline-flex;
            align-items: center;
            gap: 5px;
        }
        .flow-key {
            width: 18px;
            height: 3px;
            border-radius: 999px;
        }
        .flow-key.smooth { background: #22c55e; }
        .flow-key.usable { background: #38bdf8; }
        .flow-key.weak { background: #f97316; }
        .wuxing-chain-scroll {
            overflow-x: auto;
            padding: 4px 2px 9px;
            scrollbar-width: thin;
        }
        .wuxing-generation-chain {
            display: flex;
            min-width: 790px;
        }
        .wuxing-flow-step {
            display: grid;
            grid-template-columns: 86px minmax(58px, 1fr);
            grid-template-rows: 82px 32px;
            align-items: center;
            flex: 1 0 158px;
        }
        .wuxing-energy-node {
            grid-column: 1;
            grid-row: 1;
            width: 76px;
            height: 76px;
            display: grid;
            place-items: center;
            border-radius: 50%;
            background:
                conic-gradient(
                    var(--element-color) var(--energy),
                    rgba(148, 163, 184, 0.13) 0
                );
            box-shadow: 0 0 22px color-mix(in srgb, var(--element-color) 20%, transparent);
        }
        .wuxing-energy-core {
            width: 61px;
            height: 61px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            background: var(--bg-dark);
            border: 1px solid color-mix(in srgb, var(--element-color) 42%, transparent);
        }
        .wuxing-energy-core strong {
            color: var(--element-color);
            font-size: 23px;
            line-height: 1;
        }
        .wuxing-energy-core span {
            margin-top: 5px;
            color: var(--text-muted);
            font-size: 10px;
        }
        .wuxing-node-meta {
            grid-column: 1;
            grid-row: 2;
            display: flex;
            justify-content: center;
            gap: 6px;
            width: 76px;
            font-size: 11px;
        }
        .wuxing-node-meta small { color: var(--text-muted); }
        .wuxing-generation-edge {
            grid-column: 2;
            grid-row: 1 / span 2;
            display: grid;
            grid-template-columns: 1fr 25px;
            grid-template-rows: 20px 22px;
            align-items: center;
            padding-right: 7px;
            color: #94a3b8;
        }
        .edge-line {
            grid-column: 1 / span 2;
            position: relative;
            display: block;
            width: calc(100% - 8px);
            height: 2px;
            border-radius: 999px;
            background: currentColor;
        }
        .edge-line::after {
            content: '';
            position: absolute;
            right: -1px;
            top: 50%;
            width: 7px;
            height: 7px;
            border-top: 2px solid currentColor;
            border-right: 2px solid currentColor;
            transform: translateY(-50%) rotate(45deg);
        }
        .wuxing-generation-edge b {
            color: currentColor;
            font-size: 11px;
        }
        .wuxing-generation-edge small {
            justify-self: end;
            color: currentColor;
            font-size: 10px;
        }
        .wuxing-generation-edge.smooth { color: #22c55e; }
        .wuxing-generation-edge.usable { color: #38bdf8; }
        .wuxing-generation-edge.weak { color: #f97316; }
        .wuxing-generation-edge.broken {
            color: #ef4444;
        }
        .wuxing-generation-edge.broken .edge-line {
            background: repeating-linear-gradient(
                90deg,
                currentColor 0 7px,
                transparent 7px 12px
            );
        }
        .wuxing-cycle-caption {
            margin-top: 2px;
            color: var(--text-muted);
            font-size: 11px;
            text-align: center;
        }
        .control-pressure-row {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: 17px;
            padding-top: 14px;
            border-top: 1px solid var(--border);
        }
        .control-pressure-title {
            margin-right: 3px;
            color: var(--text-muted);
            font-size: 11px;
            font-weight: 600;
        }
        .control-pressure {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 5px 8px;
            border: 1px solid var(--border);
            border-radius: 999px;
            background: rgba(148, 163, 184, 0.05);
            font-size: 11px;
        }
        .control-pressure em {
            padding-left: 3px;
            color: var(--text-muted);
            font-style: normal;
        }
        .control-pressure.alert {
            border-color: rgba(239, 68, 68, 0.35);
            background: rgba(239, 68, 68, 0.08);
        }
        .flow-muted {
            color: var(--text-muted);
            font-size: 11px;
        }
        .flow-summary {
            margin-top: 13px;
            padding: 11px 13px;
            border-left: 3px solid var(--primary);
            border-radius: 0 8px 8px 0;
            background: rgba(30, 136, 229, 0.07);
            color: var(--text-secondary);
            font-size: 12px;
            line-height: 1.7;
        }
        .energy-composition {
            display: flex;
            height: 13px;
            overflow: hidden;
            border-radius: 999px;
            background: rgba(148, 163, 184, 0.1);
        }
        .energy-composition span {
            min-width: 0;
            transition: width 0.3s ease;
        }
        .energy-summary-grid {
            display: grid;
            grid-template-columns: repeat(5, minmax(0, 1fr));
            gap: 7px;
            margin-top: 14px;
        }
        .energy-summary-chip {
            display: grid;
            grid-template-columns: 7px 1fr;
            grid-template-rows: auto auto;
            column-gap: 6px;
            padding: 8px;
            border: 1px solid var(--border);
            border-radius: 9px;
            background: rgba(148, 163, 184, 0.04);
        }
        .energy-summary-chip i {
            grid-row: 1 / span 2;
            width: 5px;
            border-radius: 99px;
        }
        .energy-summary-chip span {
            color: var(--text-primary);
            font-size: 12px;
            font-weight: 600;
        }
        .energy-summary-chip strong {
            justify-self: end;
            grid-column: 2;
            grid-row: 1;
            font-size: 12px;
        }
        .energy-summary-chip small {
            grid-column: 2;
            color: var(--text-muted);
            font-size: 10px;
        }
        .energy-facts {
            display: flex;
            justify-content: space-between;
            gap: 12px;
            margin-top: 13px;
            color: var(--text-muted);
            font-size: 11px;
        }
        .diagnosis-lead {
            margin-bottom: 12px;
            color: var(--text-primary);
            line-height: 1.7;
        }
        .diagnosis-columns {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
        }
        .diagnosis-columns > div {
            padding: 10px;
            border-radius: 9px;
            background: rgba(148, 163, 184, 0.05);
        }
        .diagnosis-columns b {
            color: var(--text-muted);
            font-size: 11px;
        }
        .diagnosis-columns ul {
            margin: 7px 0 0;
            padding-left: 17px;
            font-size: 11px;
            line-height: 1.65;
        }
        .diagnosis-note {
            margin-top: 10px;
            color: var(--text-muted);
            font-size: 10px;
            line-height: 1.55;
        }

        /* 大运、流年同轴对照 */
        .fortune-board {
            overflow: hidden;
            border: 1px solid var(--border);
            border-radius: 14px;
            background: var(--bg-dark);
        }
        .fortune-board-toolbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            padding: 13px 16px;
            border-bottom: 1px solid var(--border);
            background: rgba(255, 255, 255, 0.025);
        }
        .fortune-board-title {
            color: var(--text-primary);
            font-size: 14px;
            font-weight: 700;
        }
        .fortune-selection-summary {
            margin-top: 4px;
            color: var(--text-muted);
            font-size: 11px;
            line-height: 1.5;
        }
        .fortune-selection-summary strong {
            color: var(--primary-light);
        }
        .fortune-legend {
            display: flex;
            flex-wrap: wrap;
            justify-content: flex-end;
            gap: 5px;
        }
        .fortune-legend span,
        .fortune-tendency {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border: 1px solid transparent;
            border-radius: 999px;
            font-weight: 600;
            white-space: nowrap;
        }
        .fortune-legend span {
            padding: 3px 8px;
            font-size: 10px;
        }
        .fortune-tendency {
            min-height: 20px;
            padding: 2px 7px;
            font-size: 9px;
        }
        .fortune-legend .is-strong-positive,
        .fortune-tendency.is-strong-positive,
        .fortune-selection-summary .is-strong-positive,
        .fortune-grade.is-strong-positive {
            color: #57d889;
            border-color: rgba(52, 211, 153, 0.36);
            background: rgba(52, 211, 153, 0.13);
        }
        .fortune-legend .is-positive,
        .fortune-tendency.is-positive,
        .fortune-selection-summary .is-positive,
        .fortune-grade.is-positive {
            color: #75c9bd;
            border-color: rgba(45, 212, 191, 0.3);
            background: rgba(45, 212, 191, 0.1);
        }
        .fortune-legend .is-balanced,
        .fortune-tendency.is-balanced,
        .fortune-selection-summary .is-balanced,
        .fortune-grade.is-balanced {
            color: var(--text-secondary);
            border-color: var(--border);
            background: rgba(148, 163, 184, 0.08);
        }
        .fortune-legend .is-negative,
        .fortune-tendency.is-negative,
        .fortune-selection-summary .is-negative,
        .fortune-grade.is-negative {
            color: #f5b15d;
            border-color: rgba(245, 158, 11, 0.34);
            background: rgba(245, 158, 11, 0.12);
        }
        .fortune-legend .is-strong-negative,
        .fortune-tendency.is-strong-negative,
        .fortune-selection-summary .is-strong-negative,
        .fortune-grade.is-strong-negative {
            color: #ef7d82;
            border-color: rgba(239, 68, 68, 0.34);
            background: rgba(239, 68, 68, 0.12);
        }
        .fortune-selection-summary span {
            padding: 1px 6px;
            border: 1px solid transparent;
            border-radius: 999px;
            white-space: nowrap;
        }
        .fortune-scroll {
            overflow-x: auto;
            overflow-y: hidden;
            scrollbar-color: rgba(148, 163, 184, 0.55) transparent;
            scrollbar-width: thin;
        }
        .fortune-scroll + .fortune-scroll {
            border-top: 1px solid var(--border);
        }
        .fortune-scroll::-webkit-scrollbar {
            height: 7px;
        }
        .fortune-scroll::-webkit-scrollbar-thumb {
            border-radius: 999px;
            background: rgba(148, 163, 184, 0.45);
        }
        .fortune-row {
            display: flex;
            align-items: stretch;
            width: max-content;
            min-width: 100%;
        }
        .fortune-row-label {
            position: sticky;
            left: 0;
            z-index: 3;
            display: flex;
            width: 54px;
            min-width: 54px;
            align-items: center;
            justify-content: center;
            border-right: 1px solid var(--border);
            background: var(--bg-card);
            color: var(--text-primary);
            font-size: 15px;
            font-weight: 700;
            writing-mode: vertical-rl;
            letter-spacing: 4px;
        }
        .fortune-dayun-track,
        .fortune-liunian-track {
            display: grid;
            grid-auto-flow: column;
            grid-auto-columns: 98px;
            min-height: 150px;
        }
        .fortune-dayun-cell,
        .fortune-liunian-cell {
            position: relative;
            display: flex;
            min-width: 0;
            flex-direction: column;
            align-items: center;
            justify-content: flex-start;
            gap: 3px;
            box-sizing: border-box;
            padding: 10px 6px 9px;
            border: 0;
            border-right: 1px solid var(--border);
            background: transparent;
            color: var(--text-primary);
            font: inherit;
            text-align: center;
        }
        .fortune-dayun-cell,
        .fortune-liunian-cell {
            cursor: pointer;
            transition: background 0.18s ease, box-shadow 0.18s ease;
        }
        .fortune-dayun-cell:hover,
        .fortune-liunian-cell:hover {
            background: rgba(30, 136, 229, 0.08);
        }
        .fortune-dayun-cell.selected {
            z-index: 1;
            background: rgba(30, 136, 229, 0.13);
            box-shadow: inset 0 -3px 0 var(--primary);
        }
        .fortune-dayun-cell.is-current::before {
            content: '当前';
            position: absolute;
            top: 4px;
            right: 4px;
            color: var(--primary-light);
            font-size: 8px;
            font-weight: 700;
        }
        .fortune-year {
            color: var(--text-secondary);
            font-size: 12px;
            line-height: 1.2;
        }
        .fortune-age {
            min-height: 14px;
            color: var(--text-muted);
            font-size: 9px;
            line-height: 1.2;
        }
        .fortune-ganzhi {
            display: block;
            margin: 3px 0 1px;
            font-size: 25px;
            font-weight: 750;
            line-height: 1.05;
        }
        .fortune-ten-gods {
            display: flex;
            min-height: 31px;
            flex-direction: column;
            color: var(--text-secondary);
            font-size: 10px;
            line-height: 1.35;
        }
        .fortune-ten-gods small {
            color: var(--text-muted);
            font-size: 9px;
        }
        .fortune-liunian-cell.is-current-year {
            background: rgba(245, 158, 11, 0.08);
            box-shadow: inset 0 -3px 0 #f59e0b;
        }
        .fortune-liunian-cell.selected {
            z-index: 1;
            background: rgba(30, 136, 229, 0.12);
            outline: 1px solid rgba(30, 136, 229, 0.55);
            outline-offset: -1px;
        }
        .fortune-current-mark {
            position: absolute;
            top: 4px;
            right: 4px;
            color: #f5ab62;
            font-size: 8px;
            font-weight: 700;
        }
        .fortune-empty {
            display: flex;
            min-width: 260px;
            align-items: center;
            justify-content: center;
            padding: 24px;
            color: var(--text-muted);
            font-size: 12px;
        }
        .fortune-context {
            padding: 14px 16px 15px;
            border-top: 1px solid var(--border);
            background: rgba(255, 255, 255, 0.018);
        }
        .fortune-assessment-head {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 14px;
        }
        .fortune-context-title {
            color: var(--primary-light);
            font-size: 13px;
            font-weight: 700;
        }
        .fortune-context-meta {
            margin-top: 4px;
            color: var(--text-muted);
            font-size: 10px;
        }
        .fortune-grade {
            display: flex;
            min-width: 92px;
            flex-direction: column;
            align-items: center;
            gap: 1px;
            padding: 5px 9px;
            border: 1px solid var(--border);
            border-radius: 9px;
            text-align: center;
        }
        .fortune-grade strong {
            font-size: 14px;
        }
        .fortune-grade span {
            font-size: 9px;
            white-space: nowrap;
        }
        .fortune-context-copy {
            margin-top: 9px;
            color: var(--text-secondary);
            font-size: 11px;
            line-height: 1.6;
        }
        .fortune-topics {
            display: flex;
            flex-wrap: wrap;
            gap: 5px;
            margin-top: 8px;
        }
        .fortune-topics span {
            padding: 3px 8px;
            border-radius: 999px;
            background: rgba(30, 136, 229, 0.09);
            color: #8ec9ff;
            font-size: 10px;
        }
        .fortune-evidence {
            margin-top: 9px;
            border: 1px solid var(--border);
            border-radius: 9px;
            background: rgba(255, 255, 255, 0.018);
        }
        .fortune-evidence summary {
            padding: 8px 10px;
            color: var(--text-secondary);
            font-size: 10px;
            cursor: pointer;
        }
        .fortune-evidence ol {
            display: grid;
            gap: 6px;
            margin: 0;
            padding: 0 10px 10px;
            list-style: none;
        }
        .fortune-evidence li {
            display: grid;
            grid-template-columns: 18px 1fr;
            gap: 5px;
            color: var(--text-muted);
            font-size: 10px;
            line-height: 1.55;
        }
        .fortune-evidence li b {
            display: flex;
            width: 17px;
            height: 17px;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            background: rgba(30, 136, 229, 0.12);
            color: var(--primary-light);
            font-size: 9px;
        }
        .fortune-relations {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            margin-top: 8px;
        }
        .fortune-relations span {
            padding: 3px 8px;
            border: 1px solid var(--border);
            border-radius: 6px;
            color: var(--text-secondary);
            background: rgba(148, 163, 184, 0.07);
            font-size: 10px;
        }
        .fortune-relations .relation-冲 {
            color: #ef7676;
            border-color: rgba(244, 67, 54, 0.28);
            background: rgba(244, 67, 54, 0.1);
        }
        .fortune-relations .relation-合,
        .fortune-relations .relation-三合 {
            color: #5fd08b;
            border-color: rgba(76, 175, 80, 0.28);
            background: rgba(76, 175, 80, 0.1);
        }
        .fortune-relations .relation-害,
        .fortune-relations .relation-刑 {
            color: #d4a4ef;
            border-color: rgba(156, 39, 176, 0.25);
            background: rgba(156, 39, 176, 0.09);
        }
        .fortune-disclaimer {
            margin-top: 9px;
            color: var(--text-muted);
            font-size: 9px;
            line-height: 1.55;
        }

        /* 神煞词条 */
        .shensha-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 14px;
        }
        .shensha-method {
            margin-bottom: 14px;
            padding: 16px;
            border: 1px solid rgba(148, 163, 184, 0.18);
            border-radius: 14px;
            background:
                linear-gradient(135deg, rgba(255, 255, 255, 0.035), transparent 55%),
                rgba(7, 13, 24, 0.48);
            color: var(--text-secondary);
            font-size: 12px;
            line-height: 1.6;
        }
        .shensha-summary {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 18px;
        }
        .shensha-method-eyebrow {
            color: #9ba8ba;
            font-size: 10px;
            letter-spacing: .14em;
            text-transform: uppercase;
        }
        .shensha-method-title {
            margin-top: 3px;
            color: #f2f5f9;
            font-size: 16px;
            font-weight: 700;
        }
        .shensha-method-title span {
            color: #e7c064;
            font-size: 12px;
            font-weight: 500;
        }
        .shensha-method-copy {
            margin-top: 5px;
            max-width: 670px;
            color: var(--text-muted);
        }
        .shensha-counts {
            display: flex;
            flex-wrap: wrap;
            justify-content: flex-end;
            gap: 6px;
        }
        .shensha-counts span {
            padding: 4px 9px;
            border: 1px solid currentColor;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.025);
            font-size: 10px;
            white-space: nowrap;
        }
        .shensha-counts .count-core { color: #e8c568; }
        .shensha-counts .count-common { color: #62d6aa; }
        .shensha-counts .count-auxiliary { color: #aeb9c8; }
        .shensha-filters {
            display: flex;
            gap: 6px;
            margin-top: 13px;
        }
        .shensha-filters button {
            min-width: 50px;
            padding: 5px 11px;
            border: 1px solid rgba(148, 163, 184, 0.22);
            border-radius: 999px;
            background: transparent;
            color: var(--text-muted);
            font: inherit;
            cursor: pointer;
        }
        .shensha-filters button:hover,
        .shensha-filters button.active {
            border-color: rgba(232, 197, 104, 0.52);
            background: rgba(232, 197, 104, 0.1);
            color: #f0cf77;
        }
        .shensha-method-details {
            margin-top: 12px;
            padding-top: 10px;
            border-top: 1px solid rgba(148, 163, 184, 0.12);
            color: var(--text-muted);
        }
        .shensha-method-details summary,
        .shensha-proof summary {
            cursor: pointer;
        }
        .shensha-method-details > div:first-of-type {
            margin-top: 7px;
        }
        .shensha-method ul {
            margin: 5px 0 0;
            padding-left: 18px;
        }
        .shensha-item {
            --shensha-accent: #aeb9c8;
            position: relative;
            overflow: hidden;
            min-height: 188px;
            padding: 18px;
            border: 1px solid color-mix(in srgb, var(--shensha-accent) 30%, transparent);
            border-radius: 14px;
            background:
                radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--shensha-accent) 10%, transparent), transparent 42%),
                rgba(7, 13, 24, 0.72);
            box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
        }
        .shensha-item[hidden] {
            display: none;
        }
        .shensha-tier-core {
            --shensha-accent: #e8c568;
            box-shadow: 0 10px 30px rgba(176, 132, 32, 0.1);
        }
        .shensha-tier-common {
            --shensha-accent: #62d6aa;
        }
        .shensha-tier-auxiliary {
            --shensha-accent: #aeb9c8;
        }
        .shensha-rarity-line {
            position: absolute;
            inset: 0 0 auto;
            height: 3px;
            background: linear-gradient(90deg, var(--shensha-accent), transparent 82%);
        }
        .shensha-heading {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 12px;
        }
        .shensha-identity {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .shensha-gem {
            color: var(--shensha-accent);
            font-size: 15px;
            filter: drop-shadow(0 0 7px color-mix(in srgb, var(--shensha-accent) 52%, transparent));
        }
        .shensha-name {
            margin-top: 1px;
            color: #f5f7fa;
            font-size: 17px;
            font-weight: 700;
        }
        .shensha-tier {
            color: var(--shensha-accent);
            font-size: 9px;
            letter-spacing: .1em;
        }
        .shensha-tone {
            flex: 0 0 auto;
            padding: 3px 8px;
            border: 1px solid currentColor;
            border-radius: 999px;
            font-size: 9px;
            white-space: nowrap;
        }
        .shensha-tone.tone-positive {
            color: #71d897;
            background: rgba(80, 190, 120, 0.08);
        }
        .shensha-tone.tone-risk {
            color: #e49a68;
            background: rgba(224, 128, 70, 0.08);
        }
        .shensha-tone.tone-mixed {
            color: #b9a4db;
            background: rgba(155, 122, 205, 0.08);
        }
        .shensha-keywords {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            margin: 13px 0 9px;
        }
        .shensha-keywords span {
            padding: 2px 7px;
            border: 1px solid color-mix(in srgb, var(--shensha-accent) 24%, transparent);
            border-radius: 5px;
            background: color-mix(in srgb, var(--shensha-accent) 6%, transparent);
            color: color-mix(in srgb, var(--shensha-accent) 78%, white);
            font-size: 9px;
        }
        .shensha-info {
            margin: 0;
            font-size: 12px;
            color: #c7d0dc;
            line-height: 1.7;
        }
        .shensha-proof {
            margin-top: 12px;
            padding-top: 10px;
            border-top: 1px solid rgba(148, 163, 184, 0.12);
            color: var(--text-muted);
            font-size: 10px;
        }
        .shensha-evidence {
            margin-top: 7px;
            color: var(--text-secondary);
        }
        .shensha-proof ul {
            margin: 5px 0 0;
            padding-left: 17px;
        }
        .special-pattern {
            margin-top: 20px;
            padding: 16px;
            background: rgba(255, 215, 0, 0.1);
            border-radius: 12px;
            border: 1px solid rgba(255, 215, 0, 0.3);
        }
        .pattern-title {
            font-size: 14px;
            color: var(--metal);
            font-weight: 600;
            margin-bottom: 8px;
        }

        /* 综合解读 */
        .comprehensive-score {
            display: flex;
            justify-content: center;
            gap: 30px;
            margin-bottom: 24px;
        }
        .score-item {
            text-align: center;
            padding: 20px 30px;
            background: var(--bg-dark);
            border-radius: 12px;
            border: 1px solid var(--border);
        }
        .score-label { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
        .score-value { font-size: 32px; font-weight: 700; color: var(--primary-light); }
        .comment-card {
            background: var(--bg-dark);
            padding: 20px;
            border-radius: 12px;
            border: 1px solid var(--border);
            margin-bottom: 16px;
        }
        .comment-title {
            font-size: 15px;
            color: var(--primary-light);
            margin-bottom: 12px;
            font-weight: 600;
        }
        .comment-content {
            font-size: 13px;
            color: var(--text-secondary);
            line-height: 1.8;
        }
        .analysis-summary-hero {
            position: relative;
            overflow: hidden;
            padding: 22px 24px;
            border: 1px solid rgba(210, 174, 91, .24);
            border-radius: 16px;
            background:
                radial-gradient(circle at 90% 0%, rgba(210, 174, 91, .12), transparent 42%),
                linear-gradient(135deg, rgba(19, 31, 47, .96), rgba(8, 15, 26, .96));
        }
        .analysis-summary-hero > span {
            color: #c9a85e;
            font-size: 10px;
            font-weight: 700;
            letter-spacing: .15em;
        }
        .analysis-summary-hero > strong {
            display: block;
            margin-top: 7px;
            color: #f4f0e7;
            font-family: "Noto Serif SC", "Songti SC", serif;
            font-size: 23px;
            line-height: 1.45;
        }
        .analysis-summary-hero > p {
            max-width: 820px;
            margin: 8px 0 0;
            color: #9dacba;
            font-size: 12px;
            line-height: 1.7;
        }
        .analysis-highlight-grid {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 12px;
            margin: 14px 0;
        }
        .analysis-highlight {
            --highlight-color: #78b9cd;
            min-height: 140px;
            padding: 17px;
            border: 1px solid color-mix(in srgb, var(--highlight-color) 26%, transparent);
            border-radius: 14px;
            background:
                radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--highlight-color) 10%, transparent), transparent 46%),
                rgba(8, 15, 26, .78);
        }
        .analysis-highlight.tone-structure { --highlight-color: #d6b66c; }
        .analysis-highlight.tone-useful { --highlight-color: #68c99c; }
        .analysis-highlight.tone-flow { --highlight-color: #62b8d5; }
        .analysis-highlight > span {
            color: var(--highlight-color);
            font-size: 10px;
            font-weight: 650;
        }
        .analysis-highlight > strong {
            display: block;
            margin-top: 8px;
            color: #eef4f7;
            font-size: 20px;
        }
        .analysis-highlight > p {
            margin: 8px 0 0;
            color: #9dacba;
            font-size: 11px;
            line-height: 1.65;
        }
        .analysis-evidence-drawer {
            padding: 15px 18px;
            border: 1px solid rgba(148, 163, 184, .14);
            border-radius: 13px;
            background: rgba(7, 13, 23, .56);
        }
        .analysis-evidence-drawer > summary {
            color: #a9c8d3;
            font-size: 12px;
            font-weight: 650;
            cursor: pointer;
        }
        .analysis-facts-compact {
            margin-top: 15px;
        }
        .analysis-facts-compact .overview-card {
            padding: 14px;
        }
        .analysis-conclusion-list {
            display: grid;
            gap: 8px;
            margin-top: 12px;
        }
        .analysis-conclusion-list article {
            padding: 13px 15px;
            border-left: 2px solid rgba(102, 184, 213, .52);
            background: rgba(255, 255, 255, .018);
        }
        .analysis-conclusion-list strong {
            color: #d9e4e9;
            font-size: 12px;
        }
        .analysis-conclusion-list p {
            margin: 5px 0;
            color: #aab8c3;
            font-size: 11px;
            line-height: 1.65;
        }
        .analysis-conclusion-list small {
            display: block;
            color: var(--text-muted);
            font-size: 9px;
            line-height: 1.55;
        }
        @media (max-width: 780px) {
            .analysis-highlight-grid { grid-template-columns: 1fr; }
            .analysis-highlight { min-height: 0; }
            .analysis-summary-hero > strong { font-size: 19px; }
        }
        .advantage-card {
            background: rgba(76, 175, 80, 0.1);
            border-color: rgba(76, 175, 80, 0.3);
        }
        .advantage-card .comment-title { color: var(--wood); }
        .disadvantage-card {
            background: rgba(244, 67, 54, 0.1);
            border-color: rgba(244, 67, 54, 0.3);
        }
        .disadvantage-card .comment-title { color: var(--fire); }

        /* ========== 汉堡菜单（移动端） ========== */
        .hamburger {
            display: none;
            position: fixed;
            top: 20px;
            left: 20px;
            z-index: 1000;
            width: 44px;
            height: 44px;
            background: var(--bg-card);
            border-radius: 10px;
            border: 1px solid var(--border);
            cursor: pointer;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            gap: 5px;
            padding: 10px;
        }
        .hamburger span {
            display: block;
            width: 20px;
            height: 2px;
            background: var(--text-primary);
            border-radius: 2px;
            transition: all 0.3s;
        }
        .hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
        .hamburger.active span:nth-child(2) { opacity: 0; }
        .hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

        .sidebar-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            z-index: 999;
        }
        .sidebar-overlay.active { display: block; }

        /* ========== 响应式 ========== */
        @media (max-width: 900px) {
            .analysis-layout { flex-direction: column; }
            .sidebar {
                width: 100%;
                position: fixed;
                left: -100%;
                top: 0;
                bottom: 0;
                z-index: 1000;
                border-radius: 0;
                padding-top: 80px;
                transition: left 0.3s ease;
            }
            .sidebar.mobile-open { left: 0; }
            .hamburger { display: flex; }
            .content-area { margin-top: 60px; max-height: none; }
            .nav-tab { padding: 10px 16px; font-size: 14px; }
        }

        @media (max-width: 768px) {
            body { padding: 15px; padding-top: 80px; }
            .container { max-width: 100%; }
            .form-row { grid-template-columns: 1fr 1fr; }
            .info-grid { grid-template-columns: repeat(2, 1fr); }
            .result-panel { padding: 15px; border-radius: 16px; }
            .bazi-header-info { gap: 12px; }
            .bazi-header-seal { width: 54px; height: 54px; }
            .result-panel .bazi-section,
            .result-panel .dayun-section { padding: 14px; }
            .natal-chart { min-width: 860px; }
            .natal-chart-intro { align-items: flex-start; flex-direction: column; gap: 5px; }
            .wuxing-section { grid-template-columns: 1fr; }
            .extra-info { grid-template-columns: 1fr; }
            .bazi-table .gan-cell, .bazi-table .zhi-cell { font-size: 26px; }
            .overview-grid { grid-template-columns: 1fr; }
            .shishen-grid { grid-template-columns: repeat(3, 1fr); }
            .wuxing-flow { grid-template-columns: 1fr; }
            .shensha-grid { grid-template-columns: 1fr; }
            .shensha-summary {
                flex-direction: column;
                gap: 10px;
            }
            .shensha-counts {
                justify-content: flex-start;
            }
            .sizhu-display { flex-wrap: wrap; }
            .comprehensive-score { flex-direction: column; gap: 12px; }
            .top-nav { flex-wrap: wrap; }
            .fortune-board-toolbar { align-items: flex-start; flex-direction: column; }
            .fortune-legend { justify-content: flex-start; }
            .fortune-dayun-track, .fortune-liunian-track { grid-auto-columns: 90px; }
            .fortune-row-label { width: 45px; min-width: 45px; }
            .fortune-assessment-head { flex-direction: column; }
            .fortune-grade { align-items: flex-start; }
            /* 八字概览表格移动端适配 */
            .bazi-overview-table-wrapper { margin: 12px 0; }
            .bazi-overview-table th, .bazi-overview-table td { padding: 10px 6px; min-width: 70px; }
            .bazi-overview-table .gan-cell, .bazi-overview-table .zhi-cell { font-size: 22px; }
            .bazi-overview-table .shishen-cell { font-size: 11px; }
            .bazi-overview-table .canggan-cell { font-size: 11px; line-height: 1.5; }
            .bazi-overview-table .canggan-shishen { font-size: 10px; }
            /* 天干地支卡片移动端适配 */
            .liuyi-cards { grid-template-columns: 1fr; gap: 12px; margin: 16px 0; }
            .liuyi-card { padding: 14px; }
            .liuyi-content { font-size: 12px; }
            .liuyi-tag { padding: 2px 6px; font-size: 11px; }
        }
/* V3：用神分析与说明 */
.yongshen-summary {
    margin-bottom: 18px;
    padding: 16px;
    border: 1px solid rgba(30, 136, 229, 0.35);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(30, 136, 229, 0.14), rgba(13, 71, 161, 0.08));
}

.yongshen-strategy {
    display: inline-flex;
    margin: 0 0 11px;
    padding: 4px 10px;
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.08);
    color: #7dd3fc;
    font-size: 12px;
    font-weight: 600;
}

.yongshen-assessment {
    margin: 12px 0 0;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.7;
}

.yongshen-order-reason {
    margin: -4px 0 12px;
    color: var(--text-secondary);
    font-size: 11px;
    line-height: 1.65;
}

.yongshen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.yongshen-card {
    min-height: 168px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-card);
}

.yongshen-card h3 {
    margin: 0 0 12px;
    color: var(--text-primary);
    font-size: 15px;
}

.yongshen-card p {
    color: var(--text-secondary);
    font-size: 11px;
    line-height: 1.65;
}

.yongshen-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.yongshen-card-badges span,
.tiaohou-priority {
    display: inline-flex;
    width: fit-content;
    padding: 3px 8px;
    border: 1px solid rgba(56, 189, 248, 0.26);
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.08);
    color: #7dd3fc;
    font-size: 10px;
    font-weight: 600;
}

.yongshen-route {
    color: var(--text-primary) !important;
    font-weight: 650;
}

.yongshen-muted {
    color: var(--text-muted) !important;
}

.tiaohou-tiers {
    display: grid;
    gap: 6px;
    margin: 10px 0;
}

.tiaohou-tiers div {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 7px;
    padding: 6px 8px;
    border-radius: 7px;
    background: rgba(148, 163, 184, 0.06);
    color: var(--text-secondary);
    font-size: 10px;
}

.tiaohou-tiers b {
    color: var(--primary-light);
}

.yongshen-conditions {
    margin: 9px 0;
    padding-left: 18px;
    color: var(--text-secondary);
    font-size: 11px;
    line-height: 1.7;
}

.yongshen-decision-card {
    grid-column: 1 / -1;
    min-height: auto;
}

.recommendation-row {
    display: grid;
    grid-template-columns: 24px 28px minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.recommendation-row:last-of-type {
    border-bottom: 0;
}

.recommendation-rank {
    width: 21px;
    height: 21px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(30, 136, 229, 0.14);
    color: var(--primary-light);
    font-size: 10px;
}

.recommendation-row > strong {
    font-size: 18px;
}

.recommendation-row div > span {
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
}

.recommendation-row p {
    margin: 4px 0 0;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.6;
}

.conditional-use {
    margin-top: 10px;
    padding: 9px 11px;
    border: 1px solid rgba(249, 115, 22, 0.26);
    border-radius: 9px;
    background: rgba(249, 115, 22, 0.07);
    color: var(--text-secondary);
    font-size: 11px;
}

.conditional-use p {
    margin: 3px 0;
}

.missing-note {
    margin: 11px 0 0;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.6;
}

/* ========== 子平格局解释 ========== */
.geju-explanation {
    margin-bottom: 22px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(30, 136, 229, 0.08), rgba(8, 18, 32, 0.7));
}

.geju-explanation-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.geju-method {
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 5px;
}

.geju-name {
    color: var(--primary-light);
    font-size: 22px;
    font-weight: 700;
}

.geju-confidence {
    flex: 0 0 auto;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(30, 136, 229, 0.14);
    color: var(--primary-light);
    font-size: 12px;
}

.geju-month-command {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 14px;
    align-items: stretch;
    margin-bottom: 14px;
}

.geju-month-branch {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 112px;
    border-radius: 12px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
}

.geju-month-branch strong {
    font-size: 36px;
    line-height: 1;
    margin: 8px 0;
}

.geju-stems {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}

.geju-stem {
    min-height: 92px;
    padding: 11px;
    border-radius: 11px;
    border: 1px solid var(--border);
    background: var(--bg-dark);
}

.geju-stem.selected {
    border-color: var(--primary);
    box-shadow: inset 0 0 0 1px rgba(30, 136, 229, 0.25);
}

.geju-stem.transparent {
    background: rgba(30, 136, 229, 0.09);
}

.geju-stem-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px;
}

.geju-stem-char {
    font-size: 24px;
    font-weight: 700;
}

.geju-stem-meta,
.geju-stem-visible {
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.5;
}

.geju-stem-god {
    color: var(--text-primary);
    font-size: 13px;
    margin: 5px 0 3px;
}

.geju-reason {
    padding: 13px 14px;
    margin-bottom: 12px;
    border-left: 3px solid var(--primary);
    border-radius: 0 10px 10px 0;
    background: rgba(30, 136, 229, 0.06);
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.75;
}

.geju-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.geju-detail-card {
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
}

.geju-detail-title {
    color: var(--text-muted);
    font-size: 11px;
    margin-bottom: 7px;
}

.geju-detail-value {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.65;
}

.geju-scope-note {
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.6;
    margin-top: 11px;
}

@media (max-width: 640px) {
    .boundary-status-grid,
    .cross-relation-grid {
        grid-template-columns: 1fr;
    }

    .pillar-flow-summary {
        flex-direction: column;
        gap: 5px;
    }

    .energy-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .diagnosis-columns {
        grid-template-columns: 1fr;
    }

    .energy-facts {
        flex-direction: column;
        gap: 4px;
    }

    .geju-month-command,
    .geju-detail-grid {
        grid-template-columns: 1fr;
    }

    .geju-month-branch {
        min-height: 82px;
    }

    .geju-stems {
        grid-template-columns: 1fr;
    }
}

.element-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}

.element-tag {
    padding: 4px 10px;
    border: 1px solid currentColor;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    font-size: 13px;
    font-weight: 600;
}

.analysis-note,
.site-disclaimer {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.7;
}

.analysis-note {
    margin-top: 16px;
}

/* ========== 宫位与六亲 ========== */
.liuqin-method {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 20px;
    border: 1px solid rgba(111, 179, 209, 0.2);
    border-radius: 14px;
    background:
        radial-gradient(circle at 5% 0%, rgba(70, 157, 190, 0.12), transparent 42%),
        rgba(8, 15, 27, 0.64);
}

.liuqin-method > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.liuqin-method-kicker {
    color: #7ebfd4;
    font-size: 10px;
    letter-spacing: .12em;
}

.liuqin-method strong {
    max-width: 690px;
    color: #edf4f8;
    font-size: 13px;
    line-height: 1.65;
}

.liuqin-method p {
    max-width: 380px;
    margin: 0;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.65;
}

.liuqin-subhead {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin: 26px 0 12px;
}

.liuqin-subhead > div {
    display: flex;
    align-items: center;
    gap: 9px;
}

.liuqin-subhead > div > span {
    color: #6daec5;
    font: 700 10px/1 monospace;
}

.liuqin-subhead strong {
    color: #eef3f7;
    font-size: 15px;
}

.liuqin-subhead p {
    margin: 0;
    color: var(--text-muted);
    font-size: 10px;
}

.palace-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.palace-card {
    position: relative;
    overflow: hidden;
    padding: 16px;
    border: 1px solid rgba(126, 170, 188, 0.17);
    border-radius: 13px;
    background:
        linear-gradient(155deg, rgba(91, 153, 176, 0.06), transparent 44%),
        rgba(7, 13, 24, 0.7);
}

.palace-card::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 2px;
    background: linear-gradient(#70bdd3, transparent 80%);
    content: "";
}

.palace-card-head,
.relative-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.palace-card-head > div,
.relative-card-head > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.palace-card-head span,
.relative-card-head span {
    color: var(--text-muted);
    font-size: 9px;
}

.palace-card-head strong {
    color: #eff5f8;
    font-size: 20px;
}

.palace-condition,
.relative-card-head em {
    flex: 0 0 auto;
    padding: 3px 7px;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: 8px;
    font-style: normal;
    white-space: nowrap;
}

.palace-condition.tone-support,
.relative-card.tone-support .relative-card-head em {
    color: #64d4a3;
}

.palace-condition.tone-active {
    color: #e39a68;
}

.palace-condition.tone-mixed,
.relative-card.tone-mixed .relative-card-head em {
    color: #c4a5e7;
}

.palace-condition.tone-neutral,
.relative-card.tone-neutral .relative-card-head em {
    color: #9ba8b8;
}

.palace-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 12px;
}

.palace-topics span {
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(101, 180, 205, 0.08);
    color: #82bfd2;
    font-size: 8px;
}

.palace-scope {
    min-height: 42px;
    margin: 9px 0 12px;
    color: #c2ccd5;
    font-size: 11px;
    line-height: 1.6;
}

.palace-role-row {
    display: grid;
    grid-template-columns: .7fr 1.3fr;
    gap: 6px;
}

.palace-role-row > div {
    padding: 7px;
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.018);
}

.palace-role-row span,
.palace-role-row strong {
    display: block;
}

.palace-role-row span {
    color: var(--text-muted);
    font-size: 8px;
}

.palace-role-row strong {
    margin-top: 3px;
    color: #d8e0e7;
    font-size: 9px;
    line-height: 1.45;
}

.palace-interpretation {
    margin: 11px 0 0;
    color: var(--text-secondary);
    font-size: 10px;
    line-height: 1.65;
}

.palace-signals {
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    color: var(--text-muted);
    font-size: 9px;
}

.palace-signals summary,
.liuqin-legend summary {
    cursor: pointer;
}

.palace-signals ul {
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
}

.palace-signals li {
    margin-top: 6px;
    padding-left: 8px;
    border-left: 2px solid #728092;
}

.palace-signals li.signal-support {
    border-color: #58bd91;
}

.palace-signals li.signal-active {
    border-color: #d68c60;
}

.palace-signals li strong,
.palace-signals li span {
    display: block;
}

.palace-signals li strong {
    color: #cbd4dd;
}

.palace-signals li span {
    margin-top: 2px;
    line-height: 1.5;
}

.relative-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.relative-card {
    --relative-accent: #9aa8b8;
    padding: 18px;
    border: 1px solid color-mix(in srgb, var(--relative-accent) 24%, transparent);
    border-radius: 14px;
    background:
        radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--relative-accent) 9%, transparent), transparent 40%),
        rgba(7, 13, 24, 0.7);
}

.relative-card.tone-support {
    --relative-accent: #62d1a1;
}

.relative-card.tone-mixed {
    --relative-accent: #b99cdd;
}

.relative-card-head strong {
    color: #f0f4f7;
    font-size: 17px;
}

.relative-card-head em {
    color: var(--relative-accent);
}

.relative-status-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.relative-status-wrap small {
    color: var(--text-muted);
    font-size: 8px;
}

.relative-star-line {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 12px;
}

.relative-star-line span {
    color: var(--text-muted);
    font-size: 9px;
}

.relative-star-line strong {
    color: var(--relative-accent);
    font-size: 11px;
}

.relative-focus {
    margin-top: 5px;
    color: #99a8b7;
    font-size: 10px;
}

.relative-judgment {
    margin: 12px 0;
    padding: 11px 12px;
    border-left: 2px solid var(--relative-accent);
    background: color-mix(in srgb, var(--relative-accent) 5%, transparent);
    color: #dbe4e9;
    font-size: 12px;
    font-weight: 550;
    line-height: 1.7;
}

.relative-insight-list {
    display: grid;
    gap: 8px;
}

.relative-insight-list section {
    padding: 11px 12px;
    border: 1px solid rgba(148, 163, 184, .11);
    border-radius: 9px;
    background: rgba(255, 255, 255, .018);
}

.relative-insight-list section > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.relative-insight-list section > header strong {
    color: color-mix(in srgb, var(--relative-accent) 78%, white);
    font-size: 10px;
}

.relative-insight-list section > header span {
    color: var(--text-muted);
    font-size: 8px;
}

.relative-insight-list p {
    margin: 6px 0 4px;
    color: #b8c5ce;
    font-size: 10px;
    line-height: 1.65;
}

.relative-insight-list small {
    display: block;
    color: #667789;
    font-size: 8px;
    line-height: 1.5;
}

.relative-evidence {
    margin-top: 11px;
    padding-top: 9px;
    border-top: 1px solid rgba(148, 163, 184, .1);
}

.relative-evidence summary {
    color: #8194a5;
    font-size: 9px;
    cursor: pointer;
}

.relative-evidence .relative-positions {
    margin-top: 9px;
}

.relative-source {
    margin-top: 8px;
    color: #617284;
    font-size: 8px;
    line-height: 1.5;
}

.relative-positions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.relative-positions > span,
.relative-empty {
    padding: 6px 8px;
    border: 1px solid rgba(148, 163, 184, 0.13);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.02);
    color: #aeb9c5;
    font-size: 9px;
}

.relative-positions > span.in-palace {
    border-color: color-mix(in srgb, var(--relative-accent) 36%, transparent);
    background: color-mix(in srgb, var(--relative-accent) 7%, transparent);
    color: color-mix(in srgb, var(--relative-accent) 80%, white);
}

.relative-positions small {
    display: block;
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 8px;
}

.relative-empty {
    border-style: dashed;
}

.relative-advice {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    color: var(--text-muted);
    font-size: 9px;
    line-height: 1.6;
}

.liuqin-legend {
    margin-top: 14px;
    padding: 12px 15px;
    border: 1px solid rgba(148, 163, 184, 0.13);
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 10px;
}

.liuqin-legend > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 16px;
    margin-top: 10px;
}

.liuqin-legend p {
    display: flex;
    gap: 8px;
    margin: 0;
}

.liuqin-legend strong {
    flex: 0 0 auto;
    color: #a9c9d4;
}

@media (max-width: 1050px) {
    .palace-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .liuqin-method,
    .liuqin-subhead {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .palace-card-grid,
    .relative-card-grid,
    .liuqin-legend > div {
        grid-template-columns: 1fr;
    }
}

.site-disclaimer {
    padding: 18px 12px 26px;
    text-align: center;
}

/* ========== 免费 MVP：授权、案例记忆与规则页 ========== */
.case-book-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    padding: 10px 15px;
    border: 1px solid rgba(80, 200, 190, 0.28);
    border-radius: 10px;
    background: rgba(31, 178, 164, 0.08);
    color: #9be5dc;
    font-size: 13px;
    cursor: pointer;
}

.case-book-trigger span {
    min-width: 20px;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(31, 178, 164, 0.18);
    color: #d8fffa;
    font-size: 10px;
}

.data-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 4px 0 14px;
    padding: 12px 14px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.025);
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.7;
}

.data-consent input {
    flex: 0 0 auto;
    margin-top: 4px;
    accent-color: #1fb2a4;
}

.data-consent a,
.site-footer a {
    color: #8fded5;
    text-decoration: none;
}

.data-consent a:hover,
.site-footer a:hover {
    text-decoration: underline;
}

.save-case-button {
    flex: 0 0 auto;
    padding: 8px 12px;
    border: 1px solid rgba(80, 200, 190, 0.3);
    border-radius: 9px;
    background: rgba(31, 178, 164, 0.08);
    color: #9be5dc;
    font-size: 11px;
    cursor: pointer;
}

.save-case-button:disabled {
    opacity: 0.38;
    cursor: not-allowed;
}

.site-footer {
    padding: 20px 12px 28px;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.7;
    text-align: center;
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 18px;
    margin-top: 8px;
}

.case-memory-overlay {
    position: fixed;
    z-index: 2000;
    inset: 0;
    display: flex;
    justify-content: flex-end;
    background: rgba(2, 6, 14, 0.72);
    backdrop-filter: blur(5px);
}

.case-memory-overlay[hidden] {
    display: none;
}

.case-memory-drawer {
    display: flex;
    width: min(520px, 100%);
    height: 100%;
    flex-direction: column;
    overflow: hidden;
    border-left: 1px solid rgba(80, 200, 190, 0.22);
    background:
        radial-gradient(circle at 100% 0%, rgba(31, 178, 164, 0.11), transparent 34%),
        #0b111d;
    box-shadow: -24px 0 80px rgba(0, 0, 0, 0.38);
    animation: caseDrawerIn 0.24s ease;
}

@keyframes caseDrawerIn {
    from { transform: translateX(24px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

body.case-drawer-open {
    overflow: hidden;
}

.case-memory-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 28px 26px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.case-memory-eyebrow {
    color: #5fd0c5;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2.4px;
}

.case-memory-header h2 {
    margin-top: 4px;
    font-family: serif;
    font-size: 25px;
    letter-spacing: 3px;
}

.case-memory-header p {
    max-width: 390px;
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.7;
}

.case-close-button {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    font-size: 23px;
    cursor: pointer;
}

.case-save-panel {
    padding: 18px 26px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.case-save-panel label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 11px;
}

.case-save-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.case-save-row input {
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 9px;
    outline: 0;
    background: rgba(6, 11, 20, 0.74);
    color: var(--text-primary);
}

.case-save-row input:focus {
    border-color: rgba(80, 200, 190, 0.55);
}

.case-save-row button {
    padding: 9px 13px;
    border: 1px solid rgba(80, 200, 190, 0.34);
    border-radius: 9px;
    background: rgba(31, 178, 164, 0.13);
    color: #b9f5ed;
    cursor: pointer;
}

.case-save-row button:disabled {
    opacity: 0.38;
    cursor: not-allowed;
}

.case-memory-status {
    min-height: 18px;
    margin-top: 8px;
    color: #7fcfc5;
    font-size: 10px;
}

.case-memory-status.is-error {
    color: #ff8a80;
}

.case-list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 26px 8px;
    color: var(--text-muted);
    font-size: 10px;
    letter-spacing: 1px;
}

.case-list-toolbar button,
.case-delete-button {
    border: 0;
    background: transparent;
    color: #9babbf;
    font-size: 10px;
    cursor: pointer;
}

.case-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 18px 18px;
}

.case-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    margin-top: 9px;
    padding: 6px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.022);
}

.case-item:hover {
    border-color: rgba(80, 200, 190, 0.28);
}

.case-item-main {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    padding: 9px;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.case-item-name {
    overflow: hidden;
    max-width: 100%;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.case-item-bazi {
    color: #8ddbd2;
    font-family: serif;
    font-size: 14px;
    letter-spacing: 1px;
}

.case-item-meta {
    color: var(--text-muted);
    font-size: 9px;
}

.case-delete-button {
    align-self: center;
    padding: 9px;
}

.case-delete-button:hover,
.case-list-toolbar button:hover {
    color: #ff8a80;
}

.case-empty {
    padding: 60px 20px;
    color: var(--text-muted);
    text-align: center;
}

.case-empty > div {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    margin: 0 auto 14px;
    border: 1px solid rgba(80, 200, 190, 0.25);
    border-radius: 50%;
    color: #76d2c8;
    font-family: serif;
    font-size: 21px;
}

.case-empty strong {
    display: block;
    color: var(--text-secondary);
    font-size: 13px;
}

.case-empty p {
    margin-top: 7px;
    font-size: 10px;
}

.case-storage-note {
    padding: 14px 26px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    color: var(--text-muted);
    font-size: 10px;
    line-height: 1.7;
}

.legal-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 50% 0%, rgba(30, 136, 229, 0.12), transparent 38%),
        var(--bg-primary);
}

.legal-shell {
    width: min(860px, calc(100% - 30px));
    margin: 0 auto;
    padding: 32px 0 56px;
}

.legal-back {
    display: inline-block;
    margin-bottom: 18px;
    color: #8fded5;
    font-size: 12px;
    text-decoration: none;
}

.legal-card {
    padding: clamp(24px, 5vw, 48px);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    background: rgba(10, 16, 28, 0.92);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.26);
}

.legal-eyebrow {
    color: #5fd0c5;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2.5px;
}

.legal-card h1 {
    margin-top: 7px;
    font-family: serif;
    font-size: 30px;
    letter-spacing: 4px;
}

.legal-effective {
    margin: 7px 0 22px;
    color: var(--text-muted);
    font-size: 11px;
}

.legal-card h2 {
    margin-top: 27px;
    color: #dbe7f3;
    font-size: 16px;
}

.legal-card p,
.legal-card li {
    margin-top: 10px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.95;
}

.legal-card ul {
    padding-left: 20px;
}

.legal-footer {
    display: flex;
    justify-content: center;
    gap: 18px;
    padding-top: 18px;
    color: var(--text-muted);
    font-size: 10px;
}

@media (max-width: 720px) {
    .case-book-trigger {
        margin-left: 0;
    }

    .save-case-button {
        width: 100%;
        margin-top: 10px;
    }

    .case-save-row {
        grid-template-columns: 1fr;
    }
}

/* ========== 邀请制内测入口 ========== */
.access-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 50% 0%, rgba(47, 155, 181, 0.16), transparent 34%),
        radial-gradient(circle at 90% 90%, rgba(191, 145, 47, 0.08), transparent 32%),
        #070c15;
}

.access-shell {
    display: flex;
    width: min(520px, calc(100% - 30px));
    min-height: 100vh;
    flex-direction: column;
    justify-content: center;
    margin: 0 auto;
    padding: 36px 0 24px;
}

.access-card {
    overflow: hidden;
    padding: clamp(25px, 6vw, 42px);
    border: 1px solid rgba(104, 168, 190, 0.24);
    border-radius: 22px;
    background:
        linear-gradient(155deg, rgba(18, 28, 46, 0.98), rgba(8, 13, 23, 0.99));
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
}

.access-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.access-brand-mark {
    display: grid;
    width: 56px;
    height: 56px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(211, 169, 78, 0.42);
    border-radius: 18px 5px 18px 5px;
    background: rgba(181, 128, 32, 0.08);
    color: #dfbd6b;
    font-family: "Noto Serif SC", "Songti SC", serif;
    font-size: 24px;
}

.access-eyebrow {
    color: #68bfd0;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2.6px;
}

.access-brand h1 {
    margin-top: 4px;
    color: #f0f5f8;
    font-family: "Noto Serif SC", "Songti SC", serif;
    font-size: 23px;
    letter-spacing: 3px;
}

.access-brand p {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 10px;
}

.access-divider {
    height: 1px;
    margin: 25px 0;
    background: linear-gradient(90deg, rgba(104, 191, 208, 0.3), transparent);
}

.access-copy h2 {
    color: var(--text-primary);
    font-size: 18px;
}

.access-copy p {
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.8;
}

.access-form {
    margin-top: 22px;
}

.access-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 11px;
}

.access-form input[type="password"] {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid rgba(104, 168, 190, 0.25);
    border-radius: 10px;
    outline: 0;
    background: rgba(4, 9, 17, 0.72);
    color: #e8f3f6;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 14px;
    letter-spacing: 0.6px;
}

.access-form input[type="password"]:focus {
    border-color: rgba(95, 195, 207, 0.62);
    box-shadow: 0 0 0 3px rgba(54, 165, 184, 0.09);
}

.access-form button {
    width: 100%;
    margin-top: 12px;
    padding: 12px 16px;
    border: 1px solid rgba(95, 195, 207, 0.38);
    border-radius: 10px;
    background: linear-gradient(135deg, #167f94, #1b9a99);
    color: #f7ffff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 9px 24px rgba(14, 121, 138, 0.2);
}

.access-form button:hover {
    transform: translateY(-1px);
}

.access-error {
    margin-top: 10px;
    padding: 9px 11px;
    border: 1px solid rgba(255, 107, 107, 0.22);
    border-radius: 8px;
    background: rgba(255, 82, 82, 0.07);
    color: #ffaaa4;
    font-size: 10px;
    line-height: 1.6;
}

.access-note {
    margin-top: 21px;
    padding: 13px 14px;
    border-left: 2px solid rgba(211, 169, 78, 0.45);
    border-radius: 0 8px 8px 0;
    background: rgba(211, 169, 78, 0.045);
}

.access-note strong {
    color: #d9bc78;
    font-size: 10px;
}

.access-note p {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 10px;
    line-height: 1.7;
}

.access-legal {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 21px;
}

.access-legal a {
    color: #78cbd0;
    font-size: 10px;
    text-decoration: none;
}

.access-legal a:hover {
    text-decoration: underline;
}

.access-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px 15px;
    padding: 18px 10px 0;
    color: #526274;
    font-size: 9px;
}

/* ========== 详批八字 ========== */
.detail-nav-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.detail-nav-tab.active {
    background: linear-gradient(135deg, #7c5c18, #b88728);
    box-shadow: 0 4px 18px rgba(184, 135, 40, 0.28);
}

.member-mini-badge {
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(255, 215, 0, 0.12);
    border: 1px solid rgba(255, 215, 0, 0.28);
    color: #ffe082;
    font-size: 9px;
    font-weight: 700;
}

.detail-report-shell {
    overflow: hidden;
    border: 1px solid rgba(218, 165, 62, 0.32);
    border-radius: 18px;
    background:
        radial-gradient(circle at 88% 5%, rgba(218, 165, 62, 0.12), transparent 30%),
        linear-gradient(160deg, rgba(22, 25, 36, 0.98), rgba(10, 14, 23, 0.98));
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
}

.detail-report-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 32px 34px 24px;
    border-bottom: 1px solid rgba(218, 165, 62, 0.18);
}

.detail-eyebrow {
    margin-bottom: 8px;
    color: #d9ad52;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 3px;
}

.detail-report-hero h2 {
    font-family: serif;
    font-size: 29px;
    letter-spacing: 5px;
}

.detail-report-hero p {
    max-width: 720px;
    margin-top: 10px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.75;
}

.detail-access-badge {
    flex: 0 0 auto;
    padding: 7px 12px;
    border: 1px solid rgba(218, 165, 62, 0.34);
    border-radius: 999px;
    background: rgba(218, 165, 62, 0.09);
    color: #e8c875;
    font-size: 11px;
}

.detail-dimension-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 14px 34px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.detail-dimension-strip span {
    flex: 0 0 auto;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--text-muted);
    font-size: 11px;
}

.detail-empty {
    padding: 68px 24px 76px;
    text-align: center;
}

.detail-empty-mark {
    display: grid;
    width: 68px;
    height: 68px;
    place-items: center;
    margin: 0 auto 18px;
    border: 1px solid rgba(218, 165, 62, 0.38);
    border-radius: 50%;
    color: #e0b856;
    font-family: serif;
    font-size: 28px;
    box-shadow: inset 0 0 24px rgba(218, 165, 62, 0.08);
}

.detail-empty h3 {
    margin-bottom: 8px;
    font-size: 18px;
}

.detail-empty p,
.detail-loading p {
    color: var(--text-muted);
    font-size: 12px;
}

.detail-action,
.detail-refresh {
    margin-top: 18px;
    padding: 9px 16px;
    border: 1px solid rgba(218, 165, 62, 0.38);
    border-radius: 9px;
    background: rgba(218, 165, 62, 0.12);
    color: #f0d58b;
    cursor: pointer;
}

.detail-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    min-height: 260px;
}

.detail-loading[hidden],
.detail-report[hidden] {
    display: none;
}

.detail-loading-ring {
    width: 34px;
    height: 34px;
    border: 2px solid rgba(218, 165, 62, 0.16);
    border-top-color: #d9ad52;
    border-radius: 50%;
    animation: detailSpin 0.9s linear infinite;
}

@keyframes detailSpin {
    to { transform: rotate(360deg); }
}

.detail-report {
    padding: 28px 34px 36px;
}

.detail-report-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.detail-method {
    color: #d9ad52;
    font-size: 11px;
}

.detail-report-heading h3 {
    margin-top: 5px;
    font-family: serif;
    font-size: 24px;
    letter-spacing: 3px;
}

.detail-report-heading p {
    margin-top: 5px;
    color: var(--text-muted);
}

.detail-refresh {
    margin-top: 0;
}

.detail-section-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 12px 0 20px;
}

.detail-section-nav a {
    flex: 0 0 auto;
    padding: 7px 11px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 11px;
    text-decoration: none;
}

.detail-opening {
    position: relative;
    overflow: hidden;
    margin-bottom: 8px;
    padding: 22px 24px;
    border: 1px solid rgba(218, 165, 62, 0.24);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(218, 165, 62, 0.09), rgba(255, 255, 255, 0.025));
}

.detail-opening::after {
    content: "命";
    position: absolute;
    right: 20px;
    bottom: -28px;
    color: rgba(218, 165, 62, 0.055);
    font-family: serif;
    font-size: 110px;
}

.detail-opening-label,
.detail-client-label {
    color: #d9ad52;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
}

.detail-opening p {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin-top: 10px;
    color: #d9e1ec;
    font-size: 14px;
    line-height: 1.9;
}

.detail-growth-key {
    position: relative;
    z-index: 1;
    margin-top: 14px;
    color: #f0d58b;
    font-size: 13px;
    font-weight: 600;
}

.detail-section {
    scroll-margin-top: 16px;
    margin-top: 18px;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 14px;
    background: rgba(19, 26, 43, 0.7);
}

.detail-section-header {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 12px;
    align-items: start;
    margin-bottom: 16px;
}

.detail-section-index {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 9px;
    background: rgba(218, 165, 62, 0.12);
    color: #e7bf61;
    font-family: serif;
}

.detail-section-header h4 {
    margin-bottom: 4px;
    font-size: 17px;
}

.detail-section-header p,
.detail-section-boundary {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.7;
}

.detail-client-reading {
    max-width: 920px;
    padding: 2px 2px 4px;
}

.detail-client-reading p {
    margin-top: 11px;
    color: #d2d9e3;
    font-size: 14px;
    line-height: 1.95;
}

.detail-client-reading p:first-child {
    margin-top: 0;
    color: var(--text-primary);
    font-size: 15px;
}

.detail-life-scenes,
.detail-action-list {
    margin-top: 18px;
    padding: 15px 17px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.027);
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.8;
}

.detail-life-scenes .detail-client-label,
.detail-action-list .detail-client-label {
    margin-bottom: 7px;
}

.detail-action-list {
    border-left: 2px solid rgba(218, 165, 62, 0.48);
}

.detail-action-row {
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 8px;
    margin-top: 8px;
}

.detail-action-row > span {
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
    border-radius: 50%;
    background: rgba(218, 165, 62, 0.13);
    color: #e7bf61;
    font-size: 10px;
}

.detail-consultation-question {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: 18px;
    padding: 14px 17px;
    border: 1px dashed rgba(66, 165, 245, 0.3);
    border-radius: 11px;
    background: rgba(30, 136, 229, 0.055);
}

.detail-consultation-question span {
    color: var(--primary-light);
    font-size: 10px;
}

.detail-consultation-question strong {
    color: #dbeafe;
    font-size: 13px;
    line-height: 1.7;
}

.detail-professional {
    margin-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.detail-professional summary {
    padding: 15px 2px 2px;
    color: var(--text-muted);
    font-size: 11px;
    cursor: pointer;
    user-select: none;
}

.detail-professional[open] summary {
    margin-bottom: 12px;
    color: #c5ad78;
}

.detail-entry-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.detail-entry {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: rgba(10, 14, 23, 0.68);
}

.detail-entry-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.detail-entry-top h5 {
    font-size: 14px;
}

.detail-confidence {
    color: #d9ad52;
    font-size: 10px;
}

.detail-entry-conclusion {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.75;
}

.detail-evidence {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.7;
}

.detail-condition {
    margin-top: 10px;
    color: #c5ad78;
    font-size: 11px;
    line-height: 1.65;
}

.detail-section-boundary {
    margin-top: 14px;
}

.detail-disclaimer {
    margin-top: 24px;
    padding: 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.025);
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.7;
    text-align: center;
}

@media (max-width: 720px) {
    .top-nav {
        justify-content: flex-start;
        overflow-x: auto;
    }

    .detail-report-hero,
    .detail-report-heading {
        flex-direction: column;
    }

    .detail-report-hero,
    .detail-report {
        padding-left: 18px;
        padding-right: 18px;
    }

    .detail-dimension-strip {
        padding-left: 18px;
        padding-right: 18px;
    }

    .detail-entry-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== 组合应象词条图鉴 ========== */
.manifest-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 16px;
    background:
        radial-gradient(circle at 8% 0%, rgba(66, 165, 245, 0.13), transparent 36%),
        #0d1421;
}

.manifest-eyebrow {
    color: #5daeff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
}

.manifest-summary h3 {
    margin-top: 7px;
    font-size: 20px;
}

.manifest-summary p {
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.7;
}

.manifest-summary-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(74px, 1fr));
    flex: 0 0 auto;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 12px;
}

.manifest-summary-stats div {
    min-width: 82px;
    padding: 12px 14px;
    text-align: center;
    background: rgba(4, 9, 18, 0.58);
}

.manifest-summary-stats div + div {
    border-left: 1px solid rgba(148, 163, 184, 0.14);
}

.manifest-summary-stats strong,
.manifest-summary-stats span {
    display: block;
}

.manifest-summary-stats strong {
    color: #fff;
    font-size: 19px;
}

.manifest-summary-stats span {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 10px;
}

.manifest-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 14px 0;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 12px;
    background: rgba(5, 10, 18, 0.48);
}

.manifest-filter {
    padding: 7px 11px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 12px;
    transition: 160ms ease;
}

.manifest-filter:hover,
.manifest-filter.active {
    border-color: #42a5f5;
    background: rgba(66, 165, 245, 0.12);
    color: #fff;
}

.manifest-filter span {
    margin-left: 4px;
    color: var(--text-muted);
    font-size: 10px;
}

.manifest-filter.filter-gold {
    color: #f3c969;
}

.manifest-filter.filter-blue {
    color: #63d7ad;
}

.manifest-filter.filter-white {
    color: #d4dbe6;
}

.manifest-filter.filter-legacy {
    color: #d7a4ff;
}

.manifest-legend-note {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 11px;
}

.manifest-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.manifest-card {
    --tier-color: #cbd5e1;
    --tier-glow: rgba(203, 213, 225, 0.08);
    position: relative;
    overflow: hidden;
    padding: 18px;
    border: 1px solid color-mix(in srgb, var(--tier-color) 32%, #233149);
    border-radius: 14px;
    background:
        radial-gradient(circle at 100% 0%, var(--tier-glow), transparent 42%),
        #0b111d;
}

.manifest-card[hidden] {
    display: none;
}

.manifest-tier-gold {
    --tier-color: #f0c45b;
    --tier-glow: rgba(240, 196, 91, 0.16);
    box-shadow: 0 12px 34px rgba(133, 91, 17, 0.12);
}

.manifest-tier-blue {
    --tier-color: #55d6a5;
    --tier-glow: rgba(45, 212, 160, 0.13);
}

.manifest-tier-white {
    --tier-color: #cbd5e1;
    --tier-glow: rgba(203, 213, 225, 0.07);
}

.manifest-legacy-card {
    border-style: dashed;
    background:
        radial-gradient(circle at 100% 0%, rgba(168, 85, 247, 0.08), transparent 42%),
        #0b111d;
}

.manifest-rarity-line {
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--tier-color);
    box-shadow: 0 0 14px var(--tier-color);
}

.manifest-card-head {
    display: flex;
    align-items: center;
    gap: 11px;
}

.manifest-gem {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--tier-color) 52%, transparent);
    border-radius: 9px;
    background: var(--tier-glow);
    color: var(--tier-color);
    text-shadow: 0 0 12px var(--tier-color);
}

.manifest-title-wrap {
    min-width: 0;
}

.manifest-rarity {
    color: var(--tier-color);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
}

.manifest-title-wrap h3 {
    margin-top: 3px;
    color: #fff;
    font-size: 17px;
}

.manifest-fit {
    margin-left: auto;
    text-align: right;
}

.manifest-fit strong,
.manifest-fit span {
    display: block;
}

.manifest-fit.fit-low strong {
    color: #f1b55f;
}

.manifest-fit.fit-very-low strong {
    color: #dd8cff;
}

.manifest-fit strong {
    color: var(--tier-color);
    font-size: 17px;
}

.manifest-fit span {
    color: var(--text-muted);
    font-size: 9px;
}

.manifest-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 13px;
}

.manifest-tags span {
    padding: 3px 7px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 10px;
}

.manifest-tags .manifest-tone {
    color: #d7e8fa;
}

.manifest-tags .tone-risk {
    border-color: rgba(245, 158, 11, 0.34);
    background: rgba(245, 158, 11, 0.08);
    color: #f7bd55;
}

.manifest-tags .tone-opportunity {
    border-color: rgba(52, 211, 153, 0.3);
    background: rgba(52, 211, 153, 0.07);
    color: #6ee7b7;
}

.manifest-tags .tone-legacy {
    border-color: rgba(192, 132, 252, 0.35);
    background: rgba(168, 85, 247, 0.08);
    color: #d8b4fe;
}

.manifest-traditional {
    margin-top: 14px;
    padding: 9px 11px;
    border-left: 2px solid color-mix(in srgb, var(--tier-color) 55%, transparent);
    background: rgba(255, 255, 255, 0.022);
    color: #aab7c9;
    font-family: "Noto Serif SC", "Songti SC", serif;
    font-size: 12px;
    line-height: 1.65;
}

.manifest-traditional span {
    display: block;
    margin-bottom: 5px;
    color: var(--tier-color);
    font-family: "Noto Sans SC", sans-serif;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.manifest-expression {
    margin-top: 12px;
    color: #e4eaf3;
    font-size: 13px;
    line-height: 1.8;
}

.manifest-proof {
    margin-top: 14px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.manifest-proof summary {
    padding: 11px 0 2px;
    color: var(--tier-color);
    cursor: pointer;
    font-size: 11px;
}

.manifest-proof-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 10px;
}

.manifest-proof-grid > div {
    padding: 10px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.025);
}

.manifest-proof-grid b {
    color: #dce6f3;
    font-size: 11px;
}

.manifest-proof-grid ul {
    margin: 7px 0 0 16px;
}

.manifest-proof-grid li,
.manifest-proof-grid p {
    margin-top: 4px;
    color: var(--text-secondary);
    font-size: 11px;
    line-height: 1.65;
}

.manifest-source {
    margin-top: 9px;
    color: var(--text-muted);
    font-size: 9px;
    line-height: 1.5;
}

.manifest-footnote {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.022);
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.7;
}

.manifest-empty {
    padding: 42px 24px;
    border: 1px dashed var(--border);
    border-radius: 14px;
    text-align: center;
    color: var(--text-secondary);
}

.manifest-empty-icon {
    margin-bottom: 12px;
    color: #94a3b8;
    font-size: 28px;
}

.manifest-empty span {
    display: block;
    margin-top: 7px;
    color: var(--text-muted);
    font-size: 11px;
}

@media (max-width: 820px) {
    .manifest-summary {
        align-items: stretch;
        flex-direction: column;
    }

    .manifest-summary-stats {
        width: 100%;
    }

    .manifest-toolbar {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .manifest-legend-note {
        width: 100%;
        margin: 2px 0 0;
    }

    .manifest-grid,
    .manifest-proof-grid {
        grid-template-columns: 1fr;
    }
}
