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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f0f2f5;
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}

h1 {
    text-align: center;
    color: #333;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 24px;
}

.sub-desc {
    text-align: center;
    color: #888;
    font-size: 14px;
    margin: -14px 0 26px;
}

.card {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.card + .card {
    margin-top: 24px;
}

.card-title {
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
}

.form-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.field {
    width: 140px;
}

.field label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    text-align: center;
}

.field select {
    width: 100%;
    height: 48px;
    padding: 0 15px;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    font-size: 16px;
    color: #333;
    background: #fff;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    text-align: center;
    text-align-last: center;
}

.field select:hover {
    border-color: #40a9ff;
}

.field select:focus {
    outline: none;
    border-color: #40a9ff;
    box-shadow: 0 0 0 2px rgba(24,144,255,0.2);
}

.btn-wrap {
    text-align: center;
}

button {
    display: inline-block;
    padding: 12px 50px;
    background: #1890ff;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

button:hover {
    background: #40a9ff;
}

.error {
    background: #fff2f0;
    border: 1px solid #ffccc7;
    color: #cf1322;
    padding: 12px;
    border-radius: 6px;
    margin-top: 20px;
    text-align: center;
}

.result {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #f0f0f0;
}

.result-header {
    text-align: center;
    margin-bottom: 25px;
}

.result-date {
    font-size: 20px;
    color: #333;
    font-weight: 500;
    margin-bottom: 12px;
}

.result-tags {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.tag {
    background: #f5f5f5;
    padding: 5px 15px;
    border-radius: 4px;
    font-size: 14px;
    color: #666;
}

.age-section {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 30px 0;
}

.age-box {
    text-align: center;
    padding: 25px 35px;
    border-radius: 12px;
    min-width: 140px;
}

.age-box.solar {
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(24,144,255,0.3);
}

.age-box.lunar {
    background: linear-gradient(135deg, #52c41a 0%, #389e0d 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(82,196,26,0.3);
}

.age-number {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 8px;
}

.age-label {
    font-size: 14px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.age-sub {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 4px;
}

.age-detail {
    text-align: center;
    color: #666;
    font-size: 15px;
    margin-bottom: 25px;
    padding: 15px;
    background: #fafafa;
    border-radius: 8px;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 25px;
}

.stat-item {
    background: #fafafa;
    padding: 20px 30px;
    border-radius: 8px;
    text-align: center;
    min-width: 140px;
}

.stat-value {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 13px;
    color: #999;
}

.progress-box {
    background: #fafafa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.birthday-box {
    background: #fff7e6;
    border: 1px solid #ffd591;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.birthday-box.today {
    background: #f6ffed;
    border-color: #b7eb8f;
}

.birthday-text {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.birthday-sub {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

.nav-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.nav-links a {
    color: #1890ff;
    text-decoration: none;
    font-size: 14px;
    padding: 6px 12px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.nav-links a:hover {
    background: #e6f7ff;
}

.nav-disabled {
    color: #bbb;
    font-size: 14px;
    padding: 6px 12px;
}

.weather-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.weather-city {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.weather-text {
    font-size: 16px;
    color: #555;
}

.weather-temp {
    font-size: 30px;
    font-weight: 700;
    color: #1890ff;
}

.weather-extra {
    text-align: center;
    font-size: 14px;
    color: #888;
}

.weather-note {
    text-align: center;
    font-size: 12px;
    color: #bbb;
    margin-top: 6px;
}

.faq-item {
    padding: 14px 0;
    border-bottom: 1px dashed #eee;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item h3 {
    font-size: 15px;
    color: #333;
    margin-bottom: 6px;
    font-weight: 600;
}

.faq-item p {
    font-size: 14px;
    color: #666;
}

.footer {
    text-align: center;
    margin-top: 30px;
    font-size: 13px;
    color: #999;
}

.footer a {
    color: #999;
    text-decoration: none;
}

/* 归档页（月/年） */
.arch-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.arch-link {
    display: inline-block;
    background: #e6f7ff;
    color: #1890ff;
    text-decoration: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid #bae7ff;
    transition: background 0.2s, color 0.2s;
}

.arch-link:hover {
    background: #1890ff;
    color: #fff;
}

.arch-sub {
    font-size: 13px;
    color: #999;
    margin-top: 12px;
}

/* 首页“按年份浏览” */
.year-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.year-link {
    display: inline-block;
    background: #f6f8fa;
    color: #555;
    text-decoration: none;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 13px;
    border: 1px solid #e5e7eb;
}

.year-link:hover {
    background: #1890ff;
    color: #fff;
    border-color: #1890ff;
}

.nav-disabled {
    color: #bbb;
    font-size: 14px;
}

/* 老黄历卡片 */
.hl-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    font-size: 13px;
    color: #888;
    margin-bottom: 16px;
}

.hl-yiji {
    display: flex;
    gap: 14px;
    margin-bottom: 16px;
}

.hl-col {
    flex: 1;
    background: #fafafa;
    border-radius: 8px;
    padding: 14px;
}

.hl-col-title {
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 15px;
}

.hl-yi .hl-col-title {
    color: #2e9e44;
}

.hl-ji .hl-col-title {
    color: #d64541;
}

.hl-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.hl-tag {
    display: inline-block;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 3px 9px;
    font-size: 13px;
    color: #555;
}

.hl-badge {
    display: inline-block;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 12px;
    margin-left: 4px;
    vertical-align: 1px;
}

.hl-badge.dao {
    background: #fdf3e3;
    color: #b5854a;
}

.hl-badge.hei {
    background: #f1f2f5;
    color: #70737a;
}

.hl-wear {
    background: #f7faf8;
    border: 1px dashed #d6e4dc;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    margin-top: 14px;
}

.hl-wear b { color: #2f6b4f; }

.hl-sel { margin-bottom: 10px; }

.hl-sel b {
    display: inline-block;
    min-width: 86px;
    color: #444;
}

.hl-sel span { color: #666; font-size: 14px; }

/* 月历格子（点进去就是当天黄历） */
.cal-h {
    text-align: center;
    font-size: 12px;
    color: #999;
    padding: 4px 0;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.cal-cell {
    display: block;
    background: #fff;
    border: 1px solid #eceef1;
    border-radius: 8px;
    padding: 7px 3px 5px;
    text-align: center;
    text-decoration: none;
    color: #333;
    min-height: 62px;
}

.cal-cell:hover { border-color: #b5854a; }

.cal-cell.empty {
    border: none;
    background: transparent;
    min-height: 62px;
}

.cal-cell.today {
    border-color: #b5854a;
    background: #fffbf2;
}

.cal-num {
    display: block;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
}

.cal-lunar {
    display: block;
    font-size: 11px;
    color: #888;
    margin-top: 3px;
    line-height: 1.2;
}

.cal-lunar.first { color: #c0392b; font-weight: 600; }

.cal-dao {
    display: block;
    width: 5px;
    height: 5px;
    margin: 4px auto 0;
    border-radius: 50%;
    background: #d9a441;
}

.cal-empty-dao {
    display: block;
    height: 5px;
    margin-top: 4px;
}

.nl-big {
    text-align: center;
    font-size: 34px;
    font-weight: 700;
    color: #b5854a;
    letter-spacing: 1px;
    margin: 6px 0 4px;
}

.nl-sub {
    text-align: center;
    font-size: 14px;
    color: #777;
    margin-bottom: 16px;
}

.hl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
}

.hl-item {
    background: #f6f8fa;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.6;
}

.hl-item b {
    display: block;
    color: #1890ff;
    font-size: 12px;
    margin-bottom: 2px;
}

/* 五行穿衣指南 */
.wx-main {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.wx-box {
    flex: 1;
    min-width: 220px;
    border-radius: 8px;
    padding: 14px;
}

.wx-box b {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
}

.wx-box p {
    font-size: 13px;
    color: #555;
    line-height: 1.7;
}

.wx-zhu {
    background: #fff1f0;
    border: 1px solid #ffccc7;
}

.wx-zhu b {
    color: #d64541;
}

.wx-fu {
    background: #fffbe6;
    border: 1px solid #ffe58f;
}

.wx-fu b {
    color: #b8860b;
}

.wx-avoid {
    background: #e6f7ff;
    border: 1px solid #91d5ff;
}

.wx-avoid b {
    color: #1890ff;
}

.wx-tip {
    margin-top: 10px;
    padding: 12px 14px;
    background: #f6f8fa;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.8;
    color: #666;
}

.wx-tip b {
    color: #333;
}

@media screen and (max-width: 1024px) {
    .container {
        width: 100%;
        max-width: 100%;
        padding: 20px 15px;
    }

    h1 {
        font-size: 22px;
        margin-bottom: 20px;
    }

    .card {
        padding: 25px 20px;
    }

    .form-row {
        gap: 10px;
        margin-bottom: 25px;
    }

    .field {
        width: 100%;
        flex: 1;
    }

    .field select {
        height: 44px;
        padding: 0 10px;
        font-size: 15px;
    }

    button {
        padding: 12px 40px;
        font-size: 15px;
        width: 100%;
        max-width: 200px;
    }

    .age-section {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .age-box {
        width: 100%;
        max-width: 280px;
        padding: 20px 30px;
    }

    .age-number {
        font-size: 42px;
    }

    .result-date {
        font-size: 17px;
    }

    .result-tags {
        flex-wrap: wrap;
        gap: 8px;
    }

    .tag {
        font-size: 13px;
        padding: 4px 12px;
    }

    .stats {
        flex-direction: column;
        gap: 12px;
    }

    .stat-item {
        padding: 15px;
        min-width: auto;
    }

    .stat-value {
        font-size: 22px;
    }

    .birthday-box {
        padding: 15px;
    }

    .birthday-text {
        font-size: 15px;
    }

    .nav-links {
        flex-wrap: wrap;
        gap: 8px;
    }

    .arch-list {
        gap: 8px;
    }

    .hl-yiji {
        flex-direction: column;
        gap: 10px;
    }

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

    .wx-main {
        flex-direction: column;
    }
}

/* ---------- v3 内容加厚模块 ---------- */
.toc {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0 0 22px;
    font-size: 13px;
}

.toc a {
    color: #096dd9;
    background: #e6f7ff;
    border-radius: 20px;
    padding: 4px 12px;
    text-decoration: none;
}

.toc a:hover {
    background: #bae7ff;
}

.card-intro {
    font-size: 14px;
    color: #666;
    line-height: 1.9;
    margin-bottom: 18px;
}

.lead {
    background: #fff;
    border-radius: 12px;
    padding: 24px 28px;
    font-size: 14px;
    color: #555;
    line-height: 1.95;
    margin-bottom: 24px;
    text-align: justify;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.scene-item {
    display: flex;
    gap: 14px;
    background: #fafafa;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 10px;
}

.scene-item b {
    flex: 0 0 78px;
    color: #096dd9;
    font-size: 14px;
    line-height: 1.9;
}

.scene-item p {
    flex: 1;
    font-size: 14px;
    color: #555;
    line-height: 1.9;
}

.txt-block p {
    font-size: 14px;
    color: #555;
    line-height: 1.95;
    margin-bottom: 12px;
    text-align: justify;
}

.txt-block p:last-child {
    margin-bottom: 0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th,
.data-table td {
    border: 1px solid #eee;
    padding: 8px 10px;
    text-align: center;
    white-space: nowrap;
}

.data-table td:last-child {
    white-space: normal;
}

.data-table th {
    background: #f5f8fa;
    color: #333;
    font-weight: 600;
}

.data-table tr.on td {
    background: #fff7e6;
    font-weight: 600;
}

.data-table a {
    color: #096dd9;
    text-decoration: none;
}

.charc-item {
    background: #fafafa;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 10px;
}

.charc-item b {
    display: block;
    color: #096dd9;
    font-size: 14px;
    margin-bottom: 6px;
}

.charc-item p {
    font-size: 14px;
    color: #555;
    line-height: 1.9;
}

.mini-note {
    font-size: 12px;
    color: #999;
    line-height: 1.8;
    margin-top: 10px;
}

.c-muted {
    font-size: 13px;
    color: #888;
}

.brand-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0 20px;
    flex-wrap: wrap;
}

.brand-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-logo {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: linear-gradient(135deg, #2e4a6b 0%, #3f8f5c 100%);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-name {
    font-size: 17px;
    font-weight: 700;
    color: #222;
    text-decoration: none;
}

.brand-slogan {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

.brand-nav a {
    font-size: 13px;
    color: #666;
    text-decoration: none;
    margin-left: 14px;
}

.brand-nav a:hover {
    color: #096dd9;
}

.answer-box {
    background: linear-gradient(135deg, #fffdf7 0%, #fff7e6 100%);
    border: 1px solid #ffe1b6;
    border-radius: 14px;
    padding: 22px 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.answer-title {
    font-size: 13px;
    color: #b5822f;
    margin-bottom: 6px;
}

.answer-main {
    font-size: 22px;
    color: #2b2b2b;
    font-weight: 600;
    line-height: 1.5;
}

.answer-main b {
    color: #b5822f;
}

.answer-sub {
    font-size: 13px;
    color: #8a7a5c;
    margin-top: 6px;
}

.wx-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.wx-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 22px;
    padding: 6px 12px 6px 8px;
    text-decoration: none;
    font-size: 12px;
    color: #666;
}

.wx-chip b {
    color: #333;
    font-size: 13px;
}

.wx-chip i {
    color: #999;
    font-style: normal;
}

.wx-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.color-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 3px;
    vertical-align: middle;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.color-chip {
    display: inline-block;
    background: #f6f7f9;
    border-radius: 5px;
    padding: 3px 9px;
    margin: 0 6px 6px 0;
    font-size: 13px;
    color: #444;
}

.level-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lv-row {
    border-radius: 10px;
    padding: 14px 16px;
    border-left: 4px solid #ddd;
    background: #fafafa;
}

.lv-daji {
    background: #fff8ea;
    border-left-color: #d9a441;
}

.lv-ciji {
    background: #f2faf4;
    border-left-color: #3f8f5c;
}

.lv-ping {
    background: #f4f8fb;
    border-left-color: #4b7ea8;
}

.lv-shen {
    background: #fdf6f0;
    border-left-color: #d1863f;
}

.lv-jin {
    background: #f4f5f7;
    border-left-color: #5c6270;
}

.lv-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 8px;
}

.lv-head b {
    font-size: 16px;
    color: #222;
}

.lv-head span {
    font-size: 12px;
    color: #8a8a8a;
}

.lv-colors {
    margin-bottom: 8px;
}

.lv-desc {
    font-size: 13px;
    color: #555;
    line-height: 1.9;
}

.lv-howto {
    font-size: 12px;
    color: #6b7280;
    margin-top: 6px;
    line-height: 1.8;
}

.sub-title {
    font-size: 15px;
    color: #333;
    margin: 22px 0 10px;
    font-weight: 600;
}

.lv-tr-daji td {
    background: #fffdf6;
}

.card-shot {
    margin-top: 16px;
    text-align: center;
}

.card-shot img {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.card-shot .mini-note {
    margin-top: 8px;
}

.footer a {
    color: #888;
    text-decoration: none;
    margin: 0 4px;
}

.footer .icp {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #aaa;
}

@media (max-width: 1024px) {
    .scene-item {
        flex-direction: column;
        gap: 4px;
    }

    .data-table {
        font-size: 12px;
    }

    .data-table th,
    .data-table td {
        padding: 6px 6px;
    }

    .table-wrap {
        overflow-x: auto;
    }
}

@media (max-width: 640px) {
    .card {
        padding: 22px 16px;
    }

    h1 {
        font-size: 22px;
    }

    .answer-main {
        font-size: 18px;
    }

    .answer-box {
        padding: 16px;
    }

    .wx-chip {
        font-size: 11px;
        padding: 5px 9px;
    }

    .lv-head b {
        font-size: 15px;
    }

    .age-section {
        gap: 14px;
    }

    .age-box {
        padding: 18px 20px;
        min-width: 0;
    }

    .age-number {
        font-size: 34px;
    }

    .form-row {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
}