body { background: #060709; color: #f1f5f9; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
select, button { font: inherit; }
.report-shell { background: #111827; border: 1px solid rgba(250, 204, 21, 0.2); border-radius: 24px; padding: 1.4rem; box-shadow: 0 18px 45px rgba(0, 0, 0, 0.32); }
.title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; border-bottom: 1px solid rgba(148, 163, 184, 0.16); padding-bottom: 1.2rem; margin-bottom: 1.2rem; }
.eyebrow { color: #93c5fd; font-size: 0.78rem; font-weight: 900; letter-spacing: 0.08em; }
h1 { color: #facc15; font-size: clamp(1.65rem, 4vw, 2.45rem); font-weight: 950; margin-top: 0.25rem; }
.title-row p { color: #94a3b8; margin-top: 0.45rem; max-width: 760px; line-height: 1.65; }
.summary-pill { min-width: 110px; border: 1px solid rgba(250, 204, 21, 0.25); background: #020617; border-radius: 16px; padding: 0.85rem 1rem; text-align: center; }
.summary-pill span { display: block; color: #facc15; font-size: 1.35rem; font-weight: 950; }
.summary-pill small { color: #94a3b8; font-size: 0.75rem; }
.control-panel { display: grid; grid-template-columns: 1fr; gap: 1rem; background: #020617; border: 1px solid rgba(148, 163, 184, 0.14); border-radius: 18px; padding: 1rem; margin-bottom: 1rem; }
@media (min-width: 900px) { .control-panel { grid-template-columns: 1.4fr 1fr auto; align-items: end; } }
.control-group label { color: #94a3b8; display: block; font-size: 0.78rem; font-weight: 800; margin-bottom: 0.45rem; }
.inline-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 0.55rem; }
.control-panel .inline-controls select { width: 116px; min-width: 116px; background: #000; color: #f8fafc; border: 1px solid #374151; border-radius: 12px; padding: 0.62rem 0.8rem; font-weight: 900; color-scheme: dark; }
.control-panel .inline-controls select#zodiacFilter { width: 136px; min-width: 136px; }
.inline-controls select option { background: #000; color: #f8fafc; }
.year-input { width: 116px; min-width: 116px; background: #000; color: #f8fafc; border: 1px solid #374151; border-radius: 12px; padding: 0.62rem 0.8rem; font-weight: 900; color-scheme: dark; }
.year-input:focus { border-color: #facc15; outline: none; box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.22); }
.inline-controls span { color: #94a3b8; }
button { border: 0; cursor: pointer; }
.inline-controls button, .print-btn { background: #facc15; color: #020617; border-radius: 12px; padding: 0.65rem 1rem; font-weight: 900; }
.inline-controls button.secondary { background: #1f2937; color: #facc15; border: 1px solid rgba(250, 204, 21, 0.2); }
.print-btn { height: 43px; }
.highlight-grid { display: grid; grid-template-columns: repeat(1, minmax(0, 1fr)); gap: 12px; margin: 1rem 0; }
@media (min-width: 768px) { .highlight-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.highlight-card { background: #020617; border: 1px solid rgba(148, 163, 184, 0.15); border-left: 5px solid #facc15; border-radius: 16px; padding: 1rem; }
.highlight-rank { color: #020617; background: #facc15; display: inline-block; border-radius: 999px; padding: 2px 8px; font-size: 0.68rem; font-weight: 950; }
.highlight-zodiac { color: #f8fafc; font-size: 1.35rem; font-weight: 950; margin-top: 0.55rem; }
.highlight-card p { color: #cbd5e1; font-size: 0.84rem; line-height: 1.58; margin: 0.4rem 0; }
.highlight-card strong { color: #93c5fd; }
.table-wrapper { overflow-x: auto; border-radius: 18px; border: 1px solid rgba(148, 163, 184, 0.14); }
.taisui-table { width: 100%; border-collapse: collapse; min-width: 1120px; background: #0f172a; }
.taisui-table th { background: #1e293b; color: #facc15; font-size: 0.78rem; padding: 0.85rem 0.45rem; text-align: center; border-bottom: 1px solid #334155; white-space: nowrap; }
.taisui-table td { color: #e2e8f0; text-align: center; padding: 0.82rem 0.45rem; border-bottom: 1px solid #1e293b; font-size: 0.82rem; vertical-align: middle; }
.taisui-table tr:hover td { background: #172033; }
.year-cell { color: #fef3c7 !important; font-weight: 900; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.year-link { color: #facc15; background: rgba(250, 204, 21, 0.1); border: 1px solid rgba(250, 204, 21, 0.22); border-radius: 999px; padding: 4px 10px; display: inline-block; }
.year-link:hover { color: #020617; background: #facc15; }
.ganzhi { color: #facc15; font-weight: 950; margin-bottom: 0.25rem; }
.tai-name { font-weight: 900; }
.text-metal { color: #fbbf24; }
.text-wood { color: #4ade80; }
.text-water { color: #60a5fa; }
.text-fire { color: #f87171; }
.text-earth { color: #a78bfa; }
.nayin-badge { display: inline-block; border-radius: 999px; padding: 2px 8px; font-size: 0.68rem; font-weight: 800; margin-left: 4px; }
.bg-metal-badge { background: #713f12; color: #fef3c7; }
.bg-wood-badge { background: #14532d; color: #dcfce7; }
.bg-water-badge { background: #1e3a8a; color: #dbeafe; }
.bg-fire-badge { background: #7f1d1d; color: #fee2e2; }
.bg-earth-badge { background: #4c1d95; color: #ede9fe; }
.offense-wrap { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px; }
.offense-tag { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; border-radius: 999px; padding: 3px 7px; font-size: 0.68rem; font-weight: 950; }
.value-tag { background: #b45309; color: #fff7ed; }
.chong-tag { background: #dc2626; color: #fef2f2; }
.xing-tag { background: #9333ea; color: #faf5ff; }
.hai-tag { background: #0891b2; color: #ecfeff; }
.po-liupo { background: #eab308; color: #2d2a0e; }
.po-sanhepo { background: #d97706; color: #fffbeb; }
.empty-mark { color: #475569; }
.legend-box { background: #020617; border: 1px solid rgba(250, 204, 21, 0.16); border-left: 5px solid #facc15; border-radius: 16px; padding: 1rem; margin-top: 1rem; }
.legend-tags { display: flex; flex-wrap: wrap; gap: 0.75rem; color: #cbd5e1; font-size: 0.82rem; }
.legend-box p { color: #94a3b8; font-size: 0.82rem; line-height: 1.65; margin-top: 0.8rem; }
.back-link { color: #94a3b8; font-size: 0.9rem; font-weight: 800; }
.back-link:hover { color: #facc15; }
.year-jump { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; background: #020617; border: 1px solid rgba(148, 163, 184, 0.15); border-radius: 14px; padding: 8px; }
.year-jump label { color: #94a3b8; font-size: 0.78rem; font-weight: 800; padding-left: 4px; }
.year-jump select { min-width: 112px; background: #000; color: #f8fafc; border: 1px solid #374151; border-radius: 10px; padding: 0.55rem 2rem 0.55rem 0.75rem; font-weight: 900; color-scheme: dark; }
.year-jump select option { background: #000; color: #f8fafc; }
.year-jump button { background: #facc15; color: #020617; border-radius: 10px; padding: 0.58rem 0.9rem; font-weight: 900; }
.year-jump .print-btn { height: auto; }
.year-hero { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: stretch; border-bottom: 1px solid rgba(148, 163, 184, 0.16); padding-bottom: 1.2rem; margin-bottom: 1rem; }
.year-hero p { color: #94a3b8; line-height: 1.65; margin-top: 0.5rem; }
.year-seal { min-width: 150px; border-radius: 20px; background: #020617; border: 1px solid rgba(250, 204, 21, 0.22); display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 1rem; }
.year-seal span { font-size: 2rem; font-weight: 950; }
.year-seal small { color: #94a3b8; font-weight: 900; margin-top: 0.2rem; }
.year-overview { display: grid; grid-template-columns: repeat(1, minmax(0, 1fr)); gap: 12px; margin-bottom: 1rem; }
@media (min-width: 768px) { .year-overview { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.overview-card { background: #020617; border: 1px solid rgba(148, 163, 184, 0.14); border-radius: 16px; padding: 1rem; }
.overview-card span { display: block; color: #94a3b8; font-size: 0.78rem; font-weight: 800; margin-bottom: 0.35rem; }
.overview-card strong { color: #f8fafc; font-size: 1rem; }
.zodiac-brief-grid { display: grid; grid-template-columns: repeat(1, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 900px) { .zodiac-brief-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.zodiac-brief-card { background: #0f172a; border: 1px solid rgba(148, 163, 184, 0.15); border-left: 5px solid #60a5fa; border-radius: 18px; padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem; break-inside: avoid; }
.zodiac-brief-card.danger { border-left-color: #ef4444; background: linear-gradient(135deg, rgba(127, 29, 29, 0.26), #0f172a 48%); }
.zodiac-brief-card.risk { border-left-color: #fb7185; }
.zodiac-brief-card.watch { border-left-color: #facc15; }
.zodiac-brief-card.stable { border-left-color: #34d399; }
.zodiac-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.zodiac-name { color: #f8fafc; font-size: 1.35rem; font-weight: 950; }
.birth-years { color: #93c5fd; font-size: 0.76rem; margin-top: 0.25rem; line-height: 1.45; }
.risk-badge { color: #020617; background: #facc15; border-radius: 999px; padding: 4px 10px; font-size: 0.72rem; font-weight: 950; white-space: nowrap; }
.zodiac-brief-card.danger .risk-badge { background: #ef4444; color: #fff; }
.zodiac-brief-card.risk .risk-badge { background: #fb7185; color: #fff; }
.zodiac-brief-card.stable .risk-badge { background: #34d399; }
.brief-tags { min-height: 26px; }
.brief-tone { color: #fef3c7; background: rgba(250, 204, 21, 0.08); border: 1px solid rgba(250, 204, 21, 0.15); border-radius: 12px; padding: 0.65rem 0.75rem; font-size: 0.86rem; line-height: 1.55; }
.brief-lines { display: grid; gap: 0.55rem; }
.brief-lines p { color: #cbd5e1; line-height: 1.6; font-size: 0.86rem; }
.brief-lines span { display: inline-block; min-width: 42px; color: #020617; background: #facc15; border-radius: 999px; text-align: center; padding: 2px 8px; margin-right: 8px; font-size: 0.72rem; font-weight: 950; }
@media (max-width: 640px) {
    .report-shell { padding: 1rem; border-radius: 18px; }
}

@media screen {
    body {
        background:
            radial-gradient(circle at 16% 8%, rgba(255, 255, 255, 0.92), transparent 34%),
            linear-gradient(180deg, #f9eee4 0%, #fffaf2 54%, #f9eee4 100%) !important;
        color: #2b2118 !important;
    }

    .report-shell,
    .control-panel,
    .highlight-card,
    .legend-box,
    .summary-pill,
    .table-wrapper,
    .taisui-table,
    .year-jump,
    .year-seal,
    .overview-card,
    .zodiac-brief-card,
    .brief-tone {
        background: rgba(255, 255, 255, 0.86) !important;
        background-image: none !important;
        color: #2b2118 !important;
        border-color: rgba(185, 127, 46, 0.22) !important;
        box-shadow: 0 16px 36px rgba(95, 58, 22, 0.08) !important;
    }

    .report-shell {
        background: linear-gradient(135deg, #fffaf2, #fff7df) !important;
    }

    input,
    select,
    option {
        background: #fffaf2 !important;
        color: #2b2118 !important;
        color-scheme: light !important;
        border-color: rgba(185, 127, 46, 0.28) !important;
    }

    input:focus,
    select:focus {
        border-color: #d99a21 !important;
        box-shadow: 0 0 0 3px rgba(217, 154, 33, 0.18) !important;
    }

    h1,
    .eyebrow,
    .summary-pill span,
    .ganzhi,
    .year-link,
    .year-cell,
    .highlight-rank,
    .brief-lines span {
        color: #a7640b !important;
    }

    .title-row p,
    .legend-box p,
    .legend-tags,
    .highlight-card p,
    .control-group label,
    .inline-controls span,
    .birth-years,
    .brief-lines p,
    .year-hero p,
    .summary-pill small,
    .overview-card span {
        color: #654b34 !important;
    }

    .highlight-zodiac,
    .tai-name,
    .zodiac-name,
    .overview-card strong,
    .year-seal span,
    .year-seal small {
        color: #2b2118 !important;
    }

    .taisui-table th {
        background: #fae5a6 !important;
        color: #5c3808 !important;
        border-color: rgba(185, 127, 46, 0.22) !important;
    }

    .taisui-table td {
        background: #fffaf2 !important;
        color: #2b2118 !important;
        border-color: rgba(185, 127, 46, 0.14) !important;
    }

    .taisui-table tr:hover td {
        background: #fff7df !important;
    }

    .inline-controls button,
    .year-jump button,
    .print-btn,
    .summary-pill,
    .year-link,
    .risk-badge,
    .brief-lines span {
        background: #d99a21 !important;
        color: #2b2118 !important;
        border-color: #d99a21 !important;
    }

    .inline-controls button.secondary {
        background: #fffaf2 !important;
        color: #8a520c !important;
        border: 1px solid rgba(185, 127, 46, 0.28) !important;
    }

    .zodiac-brief-card.stable {
        border-left-color: #22c55e !important;
        background: linear-gradient(135deg, #ecfdf5, #fffaf2 62%) !important;
    }

    .zodiac-brief-card.risk,
    .zodiac-brief-card.danger {
        border-left-color: #ef4444 !important;
        background: linear-gradient(135deg, #fff1f2, #fffaf2 62%) !important;
    }

    .zodiac-brief-card.watch,
    .highlight-card {
        border-left-color: #d99a21 !important;
    }
}
@media print {
    body { background: #fff !important; color: #000 !important; }
    .no-print { display: none !important; }
    main { max-width: none !important; width: 100% !important; padding: 0 !important; }
    .report-shell, .highlight-card, .legend-box, .summary-pill { background: #fff !important; color: #000 !important; border-color: #999 !important; box-shadow: none !important; padding: 0.8rem !important; }
    .table-wrapper { overflow: visible !important; border: 0 !important; border-radius: 0 !important; }
    .taisui-table { min-width: 0 !important; width: 100% !important; table-layout: fixed !important; }
    .taisui-table th, .taisui-table td { white-space: normal !important; word-break: break-word !important; font-size: 0.58rem !important; padding: 0.32rem 0.18rem !important; }
    .highlight-grid, .year-overview, .zodiac-brief-grid { display: block !important; }
    .highlight-card, .overview-card, .zodiac-brief-card { margin-bottom: 0.5rem !important; break-inside: avoid !important; page-break-inside: avoid !important; }
    .zodiac-brief-card, .overview-card, .year-seal, .summary-pill { background: #fff !important; background-image: none !important; color: #000 !important; border-color: #999 !important; box-shadow: none !important; overflow: visible !important; max-height: none !important; }
    .zodiac-brief-card { min-height: 0 !important; }
    .zodiac-card-head, .year-hero { break-inside: avoid !important; page-break-inside: avoid !important; }
    .taisui-table th, .taisui-table td { color: #000 !important; border-color: #bbb !important; }
    .taisui-table th { background: #eee !important; }
    .taisui-table td { background: #fff !important; }
    p, span, h1, div, strong, small { color: #000 !important; }
    .summary-pill {
        background: #fff7ed !important;
        color: #92400e !important;
        border: 2px solid #f59e0b !important;
    }
    .summary-pill span {
        color: #92400e !important;
    }
    .summary-pill small {
        color: #b45309 !important;
    }
    .highlight-card strong, .overview-card strong, .year-seal, .brief-lines span {
        color: #b45309 !important;
    }
    .zodiac-brief-card.stable .risk-badge, .bg-wood-badge {
        background: #ecfdf5 !important;
        color: #15803d !important;
        border: 1px solid #22c55e !important;
    }
    .zodiac-brief-card.danger .risk-badge, .zodiac-brief-card.risk .risk-badge, .chong-tag {
        background: #fef2f2 !important;
        color: #b91c1c !important;
        border: 1px solid #ef4444 !important;
    }
    .zodiac-brief-card.watch .risk-badge, .risk-badge, .value-tag, .bg-metal-badge {
        background: #fff7ed !important;
        color: #b45309 !important;
        border: 1px solid #f59e0b !important;
    }
    .xing-tag, .bg-earth-badge {
        background: #faf5ff !important;
        color: #7e22ce !important;
        border: 1px solid #a855f7 !important;
    }
    .hai-tag, .bg-water-badge {
        background: #ecfeff !important;
        color: #0e7490 !important;
        border: 1px solid #06b6d4 !important;
    }
    .bg-fire-badge {
        background: #fef2f2 !important;
        color: #b91c1c !important;
        border: 1px solid #ef4444 !important;
    }
}
