﻿/* 模块面板通用样式 */
        .panel { background: #fff; border: 1px solid #e4e6ea; border-radius: var(--radius); padding: 16px; position: relative; margin-bottom: 18px; box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05); }
        .panel-title { font-weight: 700; color: #24354d; margin-bottom: 12px; border-bottom: 1px solid #e8ebef; padding-bottom: 7px; font-size: 15px; letter-spacing: 0.2px; }
        .panel-core { border: 1px solid #d7dde5; box-shadow: 0 4px 14px rgba(31,58,95,0.08); }
        .panel-secondary { border-color: #dfe5ec; }
        
        /* 标签 */
        .tag { display: inline-block; padding: 2px 6px; background: #f0f0f0; border-radius: 3px; font-size: 13px; margin-right: 5px; margin-bottom: 5px; color: #333; }
        .tag.strong { background: var(--red); color: white; }
        .tag.combo { background: #edf9f1; border: 1px solid #7bc596; color: var(--safe); font-weight: bold; }
        .tag.conflict { background: #fff4ec; border: 1px solid #ffd5bd; color: var(--risk); font-weight: bold; }
        .tag.focus { background: var(--gold); color: #fff; font-weight: bold; animation: pulse 2s infinite; }
        
        @keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(184, 134, 11, 0.4); } 70% { box-shadow: 0 0 0 6px rgba(184, 134, 11, 0); } 100% { box-shadow: 0 0 0 0 rgba(184, 134, 11, 0); } }

        /* 八字大表 */
        .bazi-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 12px; background: transparent; margin-bottom: 20px; display: none; }
        .pillar { text-align: center; position: relative; border: 1px solid #d8ccb0; border-radius: var(--radius); background: linear-gradient(180deg, #fffef8 0%, #fdf7e8 100%); overflow: hidden; box-shadow: 0 8px 20px rgba(0,0,0,0.06); }
        .pillar.p-day { border-color: #d1a95f; box-shadow: 0 10px 24px rgba(184,134,11,0.18); }
        .p-gongwei { background: #2f2f2f; color: #fff; font-size: 11px; padding: 4px 0; letter-spacing: 1px; }
        .p-head { background: linear-gradient(180deg, #b42335, var(--red-deep)); color: #fff; padding: 6px; font-size: 14px; font-weight: bold; }
        .p-ss { background: #f9f9f9; font-size: 12px; color: #555; padding: 6px 0; border-bottom: 1px solid #eee; font-weight: bold; }
        .p-gz { font-size: 52px; font-weight: bold; padding: 16px 0 12px 0; line-height: 1.1; border-bottom: 1px dashed #ddd; }
        .p-wxbar { height: 5px; }
        .p-wxbar.wood { background: #4caf50; }
        .p-wxbar.fire { background: #e53935; }
        .p-wxbar.earth { background: #8d6e63; }
        .p-wxbar.metal { background: #d4a437; }
        .p-wxbar.water { background: #1e88e5; }
        .p-detail { text-align: left; border-top: 1px solid #eee; background: rgba(255,255,255,0.75); }
        .p-detail summary { cursor: pointer; list-style: none; padding: 8px 10px; font-size: 12px; color: #5f6368; }
        .p-detail summary::-webkit-details-marker { display: none; }
        .p-detail summary::after { content: '展开'; float: right; color: #9ca3af; }
        .p-detail[open] summary::after { content: '收起'; }
        .p-detail-body { padding: 0 10px 10px 10px; font-size: 12px; color: #555; line-height: 1.7; }
        .p-ny { color: #8f6a1d; }
        .ny-badge { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #d8ccb0; border-radius: 10px; padding: 2px 6px 2px 2px; background: linear-gradient(180deg, #fffef8 0%, #f9f4e8 100%); box-shadow: 0 2px 8px rgba(72, 47, 18, 0.12); line-height: 1; }
        .ny-seal { width: 30px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.35); }
        .ny-icon { font-size: 14px; line-height: 1; color: rgba(255,255,255,0.96); font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", sans-serif; font-weight: 700; text-shadow: 0 1px 1px rgba(0,0,0,0.22); }
        .ny-name { font-size: 11px; color: #5b4630; font-weight: 700; }
        .ny-金 .ny-seal { background: radial-gradient(circle at 30% 28%, #f6df8f 0%, #c69b31 55%, #8e6b12 100%); }
        .ny-木 .ny-seal { background: radial-gradient(circle at 30% 28%, #8fd5a2 0%, #2f8f54 55%, #1f5b39 100%); }
        .ny-水 .ny-seal { background: radial-gradient(circle at 30% 28%, #8ecdf8 0%, #277cc6 55%, #114c86 100%); }
        .ny-火 .ny-seal { background: radial-gradient(circle at 30% 28%, #ffae8c 0%, #d5452f 55%, #8f2319 100%); }
        .ny-土 .ny-seal { background: radial-gradient(circle at 30% 28%, #d0b49b 0%, #8b6b55 55%, #5f4332 100%); }
        .relation-map { display: none; margin-bottom: 18px; background: #fff; border: 1px solid #e4dcc8; border-radius: var(--radius); padding: 10px; }
        .relation-title { font-size: 13px; color: #6b7280; margin-bottom: 8px; }
        .relation-track { display: grid; grid-template-columns: auto 1fr auto 1fr auto 1fr auto; align-items: center; gap: 8px; }
        .r-node { width: 34px; height: 34px; border-radius: 50%; background: #f4efe3; border: 1px solid #d7ccb3; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #5a4b2f; font-weight: bold; }
        .r-edge { min-height: 30px; border-top: 2px solid #d1d5db; position: relative; }
        .r-edge-label { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); font-size: 11px; background: #fff; padding: 0 6px; color: #6b7280; white-space: nowrap; }
        .r-edge.combo { border-top-color: #2f855a; }
        .r-edge.combo .r-edge-label { color: #2f855a; }
        .r-edge.conflict { border-top-color: #c05621; }
        .r-edge.conflict .r-edge-label { color: #c05621; }
        .r-edge.mixed { border-top-color: #7e5bef; }
        .r-edge.mixed .r-edge-label { color: #6b46c1; }

        /* 大运与流年 */
        .yun-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(95px, 1fr)); gap: 8px; display: none; }
        .yun-box { border: 1px solid #ccc; text-align: center; cursor: pointer; background: #fff; padding-bottom: 5px; transition: 0.2s; position: relative; overflow: hidden; }
        .yun-box.active { border: 2px solid var(--red); transform: scale(1.05); box-shadow: 0 4px 10px rgba(166,27,41,0.2); z-index: 2; }
        .yun-box.current-yun::after { content: "当前"; position: absolute; top: 0; right: 0; background: var(--gold); color: #fff; font-size: 10px; padding: 2px 5px; border-bottom-left-radius: 4px; }
        .y-age { background: #eee; font-size: 12px; padding: 3px; }
        .active .y-age { background: var(--red); color: white; }
        .y-gz { font-size: 26px; font-weight: bold; padding: 8px 0; }

        .ln-area { display: none; margin-top: 20px; padding: 20px; background: #fdfdfd; border: 1px dashed #ccc; border-radius: 4px; }
        .analysis-box { background: #fffaf0; border-left: 4px solid var(--gold); padding: 15px; margin-bottom: 15px; font-size: 14px; color: #444; line-height: 1.8; }
        .notice-box { background: #f8fbff; border-left: 3px solid #325a8b; padding: 12px; color: #2a3f56; font-size: 13px; line-height: 1.8; border-radius: 0 calc(var(--radius) - 2px) calc(var(--radius) - 2px) 0; }
        .notice-box b { color: #1f3a5f; }
        .policy-details { margin-top: 14px; border: 1px solid #ddd; border-radius: calc(var(--radius) - 2px); background: #fff; }
        .policy-details summary { cursor: pointer; padding: 10px 12px; font-size: 13px; color: #6b7280; }
        .policy-details[open] summary { border-bottom: 1px solid #eee; color: #374151; }
        .policy-details summary::after { content: '展开'; float: right; color: #9ca3af; }
        .policy-details[open] summary::after { content: '收起'; }
        .policy-details .notice-box { margin: 10px; }
        .plan-compare { background: linear-gradient(180deg, #ffffff 0%, #fbfaf7 100%); border: 1px solid #e7dfd1; border-radius: var(--radius); padding: 14px; margin-top: 18px; margin-bottom: 14px; box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08); }
        .plan-compare.unlocked { border-color: #cfe7d5; background: linear-gradient(180deg, #ffffff 0%, #f5fff8 100%); }
        .plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
        .plan-box { border: 1px solid #ddd; padding: 12px; background: #fafafa; border-radius: calc(var(--radius) - 2px); }
        .plan-box.dim { opacity: 0.72; filter: grayscale(0.15); }
        .plan-box.paid { border: 1px solid #d9c8a2; background: linear-gradient(180deg, #fffdf9 0%, #f9f3e8 100%); }
        .plan-box.paid.active { border-color: #5ea66f; background: linear-gradient(180deg, #ffffff 0%, #eef9f1 100%); box-shadow: 0 6px 16px rgba(47,133,90,0.16); }
        .plan-title { font-weight: bold; margin-bottom: 8px; font-size: 15px; }
        .plan-box > div { margin-bottom: 5px; }
        .plan-box > div:last-child { margin-bottom: 0; }
        .btn-unlock { margin-top: 10px; padding: 10px 14px; border: none; cursor: pointer; background: linear-gradient(180deg, #9f2534, var(--red-deep)); color: #fff; font-weight: 600; min-height: 42px; }
        .btn-unlock:hover { filter: brightness(1.02); }
        .compare-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
        .compare-item { border: 1px solid #ddd; background: #fff; padding: 10px; font-size: 13px; line-height: 1.8; border-radius: calc(var(--radius) - 2px); }
        .compare-summary { margin-top: 10px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
        .summary-stable { border: 1px solid #b7dfb7; background: #f4fff4; padding: 10px; font-size: 13px; line-height: 1.8; color: #22543d; border-radius: calc(var(--radius) - 2px); }
        .summary-sensitive { border: 1px solid #ffd3b0; background: #fff9f3; padding: 10px; font-size: 13px; line-height: 1.8; color: #8a3814; border-radius: calc(var(--radius) - 2px); }
        .lock-note { margin-top: 8px; font-size: 12px; color: #8a6d3b; background: #fff8e6; border: 1px solid #f0dfb2; padding: 6px; }
        .modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,0.45); display: none; align-items: center; justify-content: center; z-index: 9999; }
        .modal-card { width: min(92vw, 560px); background: #fff; border: 1px solid #dfe4ea; padding: 18px; box-shadow: 0 18px 36px rgba(0,0,0,0.22); border-top: 4px solid var(--red); border-radius: var(--radius); }
        .modal-title { font-size: 18px; color: #20324b; font-weight: 700; margin-bottom: 12px; }
        .modal-actions { margin-top: 12px; display: flex; gap: 8px; justify-content: flex-end; }
        .btn-ghost { padding: 9px 14px; border: 1px solid #ccc; background: #fff; cursor: pointer; min-height: 40px; }
        .btn-solid { padding: 9px 14px; border: none; background: linear-gradient(180deg, #b42335, var(--red-deep)); color: #fff; cursor: pointer; min-height: 40px; }
        .cardkey-wrap { margin-top: 12px; padding: 10px; border: 1px solid #e6e8ee; background: #f9fbff; border-radius: calc(var(--radius) - 2px); }
        .cardkey-row { display: flex; gap: 8px; margin-top: 8px; }
        .cardkey-input { flex: 1; font-size: 14px; letter-spacing: 0.6px; text-transform: uppercase; }
        .cardkey-msg { margin-top: 6px; font-size: 12px; color: #64748b; min-height: 18px; }
        .ln-wrap { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; }
        .ln-box { background: #fff; border: 1px solid #ddd; padding: 10px 8px; text-align: center; cursor: pointer; transition: 0.2s; position: relative; min-height: 76px; border-radius: calc(var(--radius) - 3px); }
        .ln-box.current-ln { border: 2px solid var(--gold); background: #fffdf5; }
        .ln-box.current-ln::before { content: "今年"; position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: var(--gold); color: #fff; font-size: 10px; padding: 2px 6px; border-radius: 10px; }
        .ln-box:hover, .ln-box.active { border-color: var(--red); background: #fff5f5; }
        .ln-year { font-size: 11px; color: #888; }
        .ln-gz { font-size: 18px; font-weight: bold; margin: 4px 0; }
        .ln-ss { font-size: 12px; color: var(--red); font-weight: bold; }
        .ln-detail-box { margin-top: 15px; padding: 15px; background: #fff8f3; border: 1px solid #ffd7c2; display: none; font-size: 14px; line-height: 1.9; border-radius: calc(var(--radius) - 2px); }
        .review-box { margin-top: 12px; padding: 14px; background: #f7fbff; border: 1px solid #d3e6ff; border-radius: calc(var(--radius) - 2px); display: none; }
        .review-title { font-weight: bold; color: #1f4b8f; margin-bottom: 8px; }
        .review-line { font-size: 13px; color: #2f3d4f; line-height: 1.8; }
        .action-card { border: 1px solid #e3e3e3; border-radius: calc(var(--radius) - 2px); background: #fff; padding: 10px; margin-top: 8px; }
        .action-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
        .p-tag { font-size: 11px; padding: 2px 8px; border-radius: 999px; font-weight: bold; }
        .p-high { background: #ffe7d7; color: #a63a00; }
        .p-mid { background: #fff3cf; color: #8a5a00; }
        .p-low { background: #e5f6ea; color: #1f6b3a; }
        .w-tag { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: #eef2ff; color: #334155; }
        .month-timeline { margin-top: 8px; padding: 10px; border: 1px solid #dbe3ed; border-radius: calc(var(--radius) - 2px); background: #fff; }
        .month-track { display: flex; gap: 8px; align-items: end; overflow-x: auto; overflow-y: hidden; padding-bottom: 4px; scrollbar-width: thin; }
        .m-node { text-align: center; position: relative; flex: 0 0 46px; }
        .m-dot { width: 12px; height: 12px; border-radius: 50%; margin: 0 auto 4px auto; border: 2px solid #94a3b8; background: #fff; }
        .m-label { font-size: 11px; color: #64748b; }
        .m-node.good .m-dot { border-color: #2f855a; background: #e7f7ec; }
        .m-node.mid .m-dot { border-color: #4b5563; background: #eef2ff; }
        .m-node.risk .m-dot { border-color: #b45309; background: #fff1e8; }
        .m-node.is-top .m-dot { width: 16px; height: 16px; border-width: 3px; box-shadow: 0 0 0 2px rgba(191,146,63,0.2); }
        .m-top { font-size: 10px; color: #8b5a1f; font-weight: 700; margin-bottom: 3px; }
        .month-track::-webkit-scrollbar { height: 6px; }
        .month-track::-webkit-scrollbar-thumb { background: #c8d3e2; border-radius: 999px; }
        .month-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; margin-top: 10px; }
        .month-card { border: 1px solid #dbe3ed; background: #fff; border-radius: calc(var(--radius) - 2px); padding: 10px; font-size: 12px; line-height: 1.7; }
        .month-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
        .month-level { font-size: 11px; padding: 1px 8px; border-radius: 999px; font-weight: 600; }
        .month-good { background: #e7f7ec; color: #1f6b3a; }
        .month-mid { background: #eef2ff; color: #334155; }
        .month-risk { background: #fff1e8; color: #9a3412; }

        .capture-wrapper > h1,
        .capture-wrapper > .subtitle,
        .capture-wrapper > .report-meta,
        .capture-wrapper > .plan-compare,
        .capture-wrapper > .time-alert,
        .capture-wrapper > .bazi-grid,
        .capture-wrapper > .grid-layout,
        .capture-wrapper > #yunTitle,
        .capture-wrapper > .yun-grid,
        .capture-wrapper > .ln-area {
            animation: riseIn 0.55s ease both;
        }
        .capture-wrapper > .subtitle { animation-delay: 0.04s; }
        .capture-wrapper > .report-meta { animation-delay: 0.08s; }
        .capture-wrapper > .plan-compare { animation-delay: 0.12s; }
        .capture-wrapper > .grid-layout { animation-delay: 0.16s; }
        .capture-wrapper > .yun-grid { animation-delay: 0.2s; }

        @keyframes riseIn {
            from { opacity: 0; transform: translateY(8px); }
            to { opacity: 1; transform: translateY(0); }
        }

        @media (max-width: 800px) {
            body { line-height: 1.58; }
            .controls { display: grid; grid-template-columns: 1fr 1fr; justify-content: initial; gap: 8px; padding: 12px; }
            .controls .input-group { width: 100%; min-width: 0; }
            .controls .input-group:first-child,
            .controls .input-group:nth-child(2) { grid-column: 1 / -1; }
            .input-group label { min-width: 62px; font-size: 12px; }
            .input-group input, .input-group select { flex: 1; }
            .input-group input, .input-group select { min-width: 0; }
            .btn-calc, .btn-export, .btn-unlock { width: 100%; }
            .controls .btn-calc, .controls .btn-export { grid-column: 1 / -1; margin-left: 0; }
            .controls-note { grid-column: 1 / -1; }
            .controls-note { text-align: left; }
            .capture-wrapper { padding: 14px 12px; }
            .panel { padding: 12px; margin-bottom: 12px; }
            .panel-title { margin-bottom: 8px; padding-bottom: 6px; font-size: 14px; }
            .bazi-grid { grid-template-columns: repeat(2, minmax(130px, 1fr)); gap: 10px; }
            .p-gz { font-size: 34px; padding: 12px 0 8px 0; }
            .p-detail summary { padding: 6px 8px; }
            .p-detail-body { font-size: 11px; line-height: 1.6; }
            .yun-grid { gap: 6px; }
            .y-gz { font-size: 22px; }
            .ln-area { padding: 12px; margin-top: 14px; }
            .analysis-box, .notice-box, .ln-detail-box { padding: 10px; font-size: 13px; line-height: 1.7; }
            .review-box { padding: 10px; }
            .relation-track { grid-template-columns: 1fr; gap: 6px; }
            .r-node { width: 100%; height: 30px; border-radius: 6px; }
            .r-edge { border-top: none; border-left: 2px solid #d1d5db; min-height: 28px; margin: 0 auto; width: 2px; }
            .r-edge-label { top: 4px; left: 8px; transform: none; }
        }

        .五行色-木 { color: #2e7d32; } .五行色-火 { color: #c62828; } .五行色-土 { color: #795548; } .五行色-金 { color: #b8860b; } .五行色-水 { color: #1565c0; }
