        :root {
            --bg-body: #f0f9ff;
            --bg-panel: #ffffff;
            --primary: #0f172a;
            --accent: #0ea5e9;
            --accent-light: #38bdf8;
            --accent-deep: #0284c7;
            --border: #bae6fd;
            --border-light: #e0f2fe;
            --ink: #0f172a;
            --text-secondary: #64748b;
            --wood: #22c55e; --fire: #f97316; --earth: #a16207; --metal: #0ea5e9; --water: #2563eb;
        }
        * { box-sizing: border-box; -webkit-font-smoothing: antialiased; }
        /* 入场/揭示动画统一交由 GSAP 控制，见 assets/app.js（Anim 模块）。
           初始隐藏态由 GSAP 在运行时设置（gsap.set），无 JS 时内容始终可见。 */
        @keyframes float { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }
        body {
            background: linear-gradient(165deg, #f0f9ff 0%, #e0f2fe 30%, #f0f9ff 70%, #e0f2fe 100%);
            background-attachment: fixed;
            color: var(--primary);
            font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
            margin: 0; padding: 0; font-size: 17px; line-height: 1.47059; font-weight: 400; letter-spacing: -0.022em;
            min-height: 100vh;
        }
        .container { max-width: 680px; margin: 0 auto; padding: 48px 24px 80px; display: flex; flex-direction: column; min-height: 100vh; }

        .page-title {
            text-align: center; margin: 0 0 12px; font-size: 2.5rem; font-weight: 700; color: var(--ink);
            letter-spacing: -0.025em; line-height: 1.1;
        }
        .page-subtitle {
            text-align: center; font-size: 1.25rem; color: var(--text-secondary); margin-bottom: 32px;
            font-weight: 400; letter-spacing: -0.01em;
        }

        .badge-tech {
            align-self: center;
            display: inline-flex;
            align-items: center;
            gap: 10px;
            padding: 8px 18px;
            border-radius: 980px;
            background: linear-gradient(135deg, rgba(14,165,233,0.15) 0%, rgba(56,189,248,0.08) 100%);
            border: 1px solid rgba(14,165,233,0.3);
            font-size: 14px;
            color: var(--ink);
            margin-bottom: 40px;
            font-weight: 500;
        }
        .badge-dot {
            width: 6px; height: 6px; border-radius: 50%;
            background: var(--accent);
            box-shadow: 0 0 10px rgba(14,165,233,0.5);
        }

        .view-tabs {
            display: flex;
            gap: 12px;
            margin-bottom: 32px;
        }
        .view-tab-btn {
            flex: 1;
            border-radius: 12px;
            border: 1px solid var(--border);
            background: #fff;
            padding: 16px 20px;
            font-size: 17px;
            font-weight: 500;
            color: var(--text-secondary);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            transition: all 0.25s cubic-bezier(0.25,0.1,0.25,1);
        }
        .view-tab-btn span.icon { font-size: 20px; }
        .view-tab-btn.active {
            background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
            color: #fff;
            border-color: #0369a1;
            box-shadow: 0 4px 16px rgba(14,165,233,0.35);
        }
        .view-tab-btn:not(.active):hover {
            background: linear-gradient(180deg, #e0f2fe 0%, #bae6fd 100%);
            border-color: var(--accent-light);
            color: var(--accent-deep);
        }

        .guide-box {
            background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #bae6fd 100%);
            border: 1px solid rgba(14,165,233,0.25);
            border-radius: 16px;
            padding: 24px 28px;
            margin-bottom: 32px;
            font-size: 15px;
            color: var(--ink);
            display: flex;
            align-items: flex-start;
            gap: 16px;
        }
        .guide-icon { font-size: 1.5em; line-height: 1; }
        .guide-text strong { color: var(--ink); font-weight: 600; }

        .control-card {
            background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(240,249,255,0.95) 100%);
            border-radius: 20px;
            padding: 32px 36px;
            margin-bottom: 32px;
            box-shadow: 0 8px 32px rgba(14,165,233,0.12), 0 0 0 1px rgba(14,165,233,0.08);
        }
        .form-group { margin-bottom: 24px; }
        .form-group:last-of-type { margin-bottom: 28px; }
        .form-group label { display: block; font-size: 13px; font-weight: 600; color: #475569; margin-bottom: 10px; letter-spacing: -0.01em; }
        .flex-row { display: flex; gap: 12px; }
        .flex-1 { flex: 1; }

        input, select, textarea {
            width: 100%; box-sizing: border-box; padding: 14px 16px;
            border: 1px solid var(--border); border-radius: 12px;
            font-size: 17px; font-family: inherit;
            background: #fff;
            appearance: none;
            transition: border-color 0.2s, box-shadow 0.2s;
        }
        input:focus, select:focus, textarea:focus {
            outline: none; border-color: var(--accent-light);
            box-shadow: 0 0 0 4px rgba(14,165,233,0.2);
        }
        textarea { resize: vertical; min-height: 80px; }

        .btn-submit {
            width: 100%;
            background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
            color: #fff;
            border: none;
            padding: 18px 24px;
            border-radius: 14px;
            font-weight: 600;
            font-size: 17px;
            cursor: pointer;
            margin-top: 12px;
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 10px;
            box-shadow: 0 6px 24px rgba(14,165,233,0.4);
            transition: transform 0.15s, box-shadow 0.2s;
        }
        .btn-submit:hover { transform: scale(1.01); box-shadow: 0 8px 28px rgba(14,165,233,0.5); }
        .btn-submit:active { transform: scale(0.99); }

        .pan-header {
            background: linear-gradient(180deg, #ffffff 0%, #f0f9ff 100%);
            padding: 28px 32px;
            border-radius: 20px;
            margin-bottom: 24px;
            border: 1px solid rgba(14,165,233,0.15);
            box-shadow: 0 4px 20px rgba(14,165,233,0.1);
            border-top: 3px solid var(--accent);
        }
        .ph-title { font-size: 1.15em; font-weight: 600; color: var(--ink); border-bottom: 1px dashed var(--border); padding-bottom: 16px; margin-bottom: 16px; }
        .ph-info { display: flex; flex-wrap: wrap; gap: 12px; font-size: 15px; color: var(--text-secondary); }
        .ph-tag {
            background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
            padding: 8px 16px;
            border-radius: 10px;
            font-size: 14px;
            color: var(--ink);
            border: 1px solid rgba(14,165,233,0.15);
        }
        .highlight { color: var(--accent); font-weight: 600; }
        .bazi-font { font-family: "Noto Serif SC", serif; font-size: 1.1em; letter-spacing: 1px; color: var(--ink); }

        .grid-box {
            width: 100%; aspect-ratio: 1/1;
            background: linear-gradient(145deg, #ffffff 0%, #f0f9ff 50%, #e0f2fe 100%);
            border: 2px solid rgba(14,165,233,0.25);
            display: grid;
            grid-template-columns: 1fr 1fr 1fr;
            grid-template-rows: 1fr 1fr 1fr;
            gap: 0;
            box-shadow: 0 8px 28px rgba(14,165,233,0.12);
            border-radius: 20px;
            overflow: hidden;
        }
        .cell {
            position: relative;
            border: 1px solid var(--border);
            margin: -1px 0 0 -1px;
            padding: 8px;
            display: grid;
            grid-template-columns: 26px 1fr 30px;
            gap: 4px;
            background: #fff;
        }
        .cell-left {
            display: flex; align-items: center; justify-content: center;
            background: linear-gradient(180deg, #f0f9ff 0%, #e0f2fe 100%);
            border-right: 1px solid var(--border);
        }
        .font-gua { font-size: 0.9em; font-weight: 600; color: var(--text-secondary); writing-mode: vertical-lr; font-family: "Noto Serif SC", serif; }
        .cell-mid { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
        .font-god { font-size: 0.8em; font-weight: 600; }
        .font-star { font-size: 0.9em; color: var(--ink); }
        .font-door { font-size: 1.1em; font-weight: 600; font-family: "Noto Serif SC", serif; }
        .cell-right {
            display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
            background: linear-gradient(180deg, #f0f9ff 0%, #e0f2fe 100%);
            border-left: 1px solid var(--border);
        }
        .stem-char { font-family: "Noto Serif SC", serif; font-size: 1.1em; font-weight: 600; line-height: 1; }
        .sky-group { display: flex; flex-direction: column; align-items: center; }

        .mark-ma { position: absolute; bottom: 6px; left: 6px; background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%); color: #fff; font-size: 11px; padding: 4px 8px; border-radius: 8px; font-weight: 600; }
        .mark-kong { position: absolute; top: 6px; left: 6px; border: 1px solid var(--border); color: var(--text-secondary); font-size: 11px; padding: 4px 8px; border-radius: 8px; }

        .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); }
        .center-cell { display: flex; flex-direction: column; align-items: center; justify-content: center; background: linear-gradient(145deg, #f0f9ff 0%, #e0f2fe 100%); border: 1px solid rgba(14,165,233,0.2); }

        #aiResult {
            margin-top: 28px;
            padding: 28px 32px;
            background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #f0f9ff 100%);
            border-radius: 20px;
            font-size: 16px;
            line-height: 1.6;
            color: var(--ink);
            border: 1px solid rgba(14,165,233,0.15);
            border-left: 4px solid var(--accent);
            box-shadow: 0 6px 24px rgba(14,165,233,0.1);
        }
        .ai-header { font-weight: 600; color: var(--accent-deep); margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid rgba(14,165,233,0.2); font-size: 1.1rem; }
        #aiResult p { margin: 0.8em 0; }
        .analysis-mode-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
        .mode-opt { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: var(--ink); cursor: pointer; }
        .mode-opt input { width: auto; }
        .knowledge-hint { margin: 10px 0 0; font-size: 0.85rem; color: #64748b; line-height: 1.5; }
        .pay-modal { position: fixed; inset: 0; z-index: 9999; background: rgba(15,23,42,0.6); display: flex; align-items: center; justify-content: center; padding: 20px; }
        .pay-modal-content { background: #fff; border-radius: 20px; padding: 28px 32px; max-width: 380px; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,0.2); border: 1px solid var(--border); }
        .pay-modal-title { font-size: 1.25rem; font-weight: 600; color: var(--ink); margin-bottom: 12px; }
        .pay-modal-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 8px; }
        .pay-amount { color: #059669; font-size: 1.1em; }
        .pay-modal-code-line { font-size: 15px; margin-bottom: 16px; padding: 10px 14px; background: #f0fdf4; border-radius: 10px; border: 1px solid #bbf7d0; }
        .pay-unlock-code { color: #047857; font-size: 1.2em; letter-spacing: 0.15em; }
        .pay-modal-code-hint { font-size: 12px; color: #64748b; margin-left: 6px; }
        .pay-modal-paid-btn { width: 100%; padding: 12px 16px; margin-bottom: 16px; border-radius: 10px; border: 1px solid #059669; background: #f0fdf4; color: #047857; font-size: 15px; font-weight: 600; cursor: pointer; }
        .pay-modal-paid-btn:hover { background: #dcfce7; }
        .pay-modal-qr-wrap { text-align: center; margin: 16px 0; min-height: 180px; }
        .pay-modal-qr { max-width: 200px; height: auto; border-radius: 12px; }
        .pay-modal-qr-placeholder { font-size: 13px; color: #94a3b8; }
        .pay-modal-account { font-size: 13px; color: var(--text-secondary); margin-bottom: 16px; }
        .pay-modal-input-wrap { display: flex; gap: 10px; margin-bottom: 8px; }
        .pay-modal-input { flex: 1; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border); font-size: 15px; }
        .pay-modal-btn { padding: 12px 20px; border-radius: 10px; background: linear-gradient(135deg,#0ea5e9,#0284c7); color: #fff; border: none; font-weight: 600; cursor: pointer; }
        .pay-modal-msg { font-size: 13px; min-height: 20px; margin-bottom: 8px; }
        .pay-modal-msg.ok { color: #059669; }
        .pay-modal-msg.err { color: #dc2626; }
        .pay-modal-close { width: 100%; padding: 10px; border-radius: 10px; border: 1px solid var(--border); background: #f8fafc; cursor: pointer; font-size: 14px; }
        .brief-mode-tip { padding: 16px 20px; font-size: 15px; color: var(--text-secondary); line-height: 1.6; background: #f8fafc; border-radius: 12px; margin-top: 12px; border: 1px dashed var(--border); }
        /* 手机端文字可读性 */
        @media (max-width: 768px) {
            body { font-size: 18px; line-height: 1.6; }
            .container { padding: 24px 16px 60px; }
            .control-card { padding: 24px 20px; }
            .guide-box { font-size: 16px; padding: 18px 20px; }
            .pan-content, .interpret-content { font-size: 16px; line-height: 1.75; }
        }
