/* ================================================================
   calendar.css —— 择日模块专属样式（完整版）
   依赖 common.css 中的基础变量和通用组件
   ================================================================ */

/* ===== 万年历主容器 ===== */
.calendar-main {
    background: #fff;
    border-radius: 28px;
    border: 1px solid var(--border-color);
    padding: 24px 28px;
    margin-top: 20px;
}
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}
.calendar-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}
.calendar-header h2 small {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 4px;
}
.calendar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.el-select, .el-input {
    appearance: none;
    -webkit-appearance: none;
    padding: 6px 32px 6px 16px;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    background: #fff 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='%23606070' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 12px center;
    background-size: 10px 10px;
    font-size: 0.85rem;
    color: #303133;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-width: 120px;
    line-height: 1.8;
    outline: none;
}
.el-input {
    background: #fff;
    min-width: 140px;
    padding: 6px 16px;
    background-image: none;
}
.el-select:hover, .el-input:hover { border-color: #c0c4cc; }
.el-select:focus, .el-input:focus {
    border-color: var(--sun-red);
    box-shadow: 0 0 0 2px rgba(235,19,19,0.1);
}

/* ===== 日期选择器（模拟 element 的 el-date-editor / el-input__icon） ===== */
.el-date-editor {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.el-date-editor input[type="date"] {
    appearance: none;
    -webkit-appearance: none;
    width: 150px;
    height: 32px;
    line-height: 32px;
    padding: 0 30px 0 12px;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    background: #fff;
    font-size: 0.82rem;
    color: #303133;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.el-date-editor input[type="date"]:hover { border-color: #c0c4cc; }
.el-date-editor input[type="date"]:focus {
    border-color: var(--sun-red);
    box-shadow: 0 0 0 2px rgba(235,19,19,0.1);
}
.el-date-editor input[type="date"]:focus + .el-input__icon { color: var(--sun-red); }
/* 隐藏原生日历指示图标，但保留其点击区域（覆盖右侧，点击即弹出原生日期面板） */
.el-date-editor input[type="date"]::-webkit-calendar-picker-indicator {
    position: absolute;
    right: 0;
    top: 0;
    width: 28px;
    height: 100%;
    margin: 0;
    padding: 0;
    opacity: 0;
    cursor: pointer;
}
/* 右侧日历图标（模拟 element 的 el-input__icon） */
.el-date-editor .el-input__icon {
    position: absolute;
    right: 9px;
    font-size: 0.85rem;
    line-height: 1;
    color: #c0c4cc;
    pointer-events: none;
    transition: color 0.2s;
}
@media (max-width: 768px) {
    .el-date-editor input[type="date"] { width: 132px; }
}

/* ===== 三列布局（万年历 index.html） ===== */
.calendar-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
    align-items: stretch;
}
@media (max-width: 992px) {
    .calendar-grid { grid-template-columns: 1fr; gap: 16px; }
}

/* 左右卡片 */
.calendar-card-side {
    background: var(--bg-light);
    border-radius: 20px;
    padding: 16px 18px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
}
.calendar-card-side .side-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 8px;
}
.yi-list, .ji-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-bottom: 8px;
}
.yi-list .tag, .ji-list .tag {
    background: #fff;
    border-radius: 30px;
    padding: 2px 14px;
    font-size: 0.8rem;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: default;
    transition: 0.2s;
}
.yi-list .tag { border-color: #a7d7b0; color: #2e7d32; }
.ji-list .tag { border-color: #f5b0b0; color: #b91c1c; }

.god-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px dashed #f0ebe6;
}
.god-list .god-item {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
}
.god-list .god-item .label { color: var(--text-muted); }
.god-list .god-item .value { font-weight: 600; color: var(--sun-red); }

.side-footer {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px dashed #f0ebe6;
}

/* 中间列 */
.calendar-center {
    background: #fffbf8;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 340px;
}
.date-selector {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
}
.date-display-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 4px 0 2px;
    height: 120px;
    line-height: 120px;
}
.nav-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: #fff;
    font-size: 1.2rem;
    font-weight: 300;
    color: var(--text-secondary);
    cursor: pointer;
    transition: 0.2s;
    text-decoration: none;
    line-height: 1;
    flex-shrink: 0;
}
.nav-arrow:hover {
    background: var(--sun-red-light);
    border-color: var(--sun-red);
    color: var(--sun-red);
}
.day-number {
    text-align: center;
    width: 160px;
    font-size: 120px;
    font-weight: 800;
    color: var(--sun-red);
    line-height: 1.2;
    letter-spacing: 1px;
}
.day-label {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-left: -2px;
}
.weekday-line {
    text-align: center;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-top: 2px;
    margin-bottom: 4px;
}
.center-bottom {
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px dashed #f0ebe6;
}
.lunar-line {
    text-align: center;
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
}
.ganzhi-line {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}
.pengzu-line {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    background: #fcf8f0;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid #f0e8d8;
    display: inline-block;
    margin: 4px auto 0;
    max-width: 95%;
    word-break: break-all;
    line-height: 1.5;
}
.pengzu-wrap { text-align: center; }

/* 日期快速导航 */
.date-quick-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 12px;
    margin: 12px 0 8px;
    padding: 10px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}
.date-quick-nav a {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 30px;
    background: #fff;
    border: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: 0.2s;
}
.date-quick-nav a:hover {
    border-color: var(--sun-red);
    color: var(--sun-red);
}
.date-quick-nav a.today {
    background: var(--sun-red);
    color: #fff;
    border-color: var(--sun-red);
    font-weight: 600;
}
.date-quick-nav a.today:hover { background: var(--sun-red-dark); }

/* 择日类型快捷入口（万年历页面） */
.choose-event-types {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 12px;
    margin: 8px 0 16px;
    padding: 8px 0;
}
.choose-event-types .event-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 16px;
    border-radius: 30px;
    background: #fff;
    border: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: 0.2s;
    text-decoration: none;
}
.choose-event-types .event-tag:hover {
    border-color: var(--sun-red);
    background: var(--sun-red-light);
    color: var(--sun-red);
}
.choose-event-types .event-tag .icon { font-size: 1rem; }

/* ===== 时辰吉凶表 ===== */
.time-table-wrap {
    margin-top: 12px;
    overflow-x: auto;
}
.time-table-wrap table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    min-width: 700px;
    font-size: 0.9rem;
}
.time-table-wrap th {
    background: #f5ede6;
    font-weight: 600;
    padding: 14px 10px;
    border: 1px solid var(--border-color);
    text-align: center;
    white-space: nowrap;
    color: var(--text-primary);
}
.time-table-wrap td {
    padding: 12px 10px;
    border: 1px solid var(--border-color);
    text-align: center;
    vertical-align: middle;
    background: #fff;
    line-height: 1.5;
    font-size: 0.85rem;
}
.time-table-wrap td.t-label {
    background: var(--bg-light);
    font-weight: 600;
    white-space: nowrap;
    color: var(--text-primary);
}
.time-table-wrap tr.good-time td {
    background: #f0f9eb;
    border-left: 4px solid #67c23a;
    font-weight: 500;
}
.time-table-wrap tr.good-time .t-label { background: #e8f5e9; }
.badge {
    display: inline-block;
    padding: 0 10px;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.8;
}
.badge-good { background: #67c23a; color: #fff; }
.badge-bad { background: #f56c6c; color: #fff; }
.badge-neutral { background: #e6a23c; color: #fff; }
.time-table-wrap tr:nth-child(even) td { background: #fcfaf8; }
.time-table-wrap tr.good-time:nth-child(even) td { background: #f0f9eb; }
.time-table-wrap tr:hover td { background: #fff5ef; }
.time-table-wrap tr.good-time:hover td { background: #e6f7e6; }

/* ===== 底部信息栏 ===== */
.calendar-footer-info {
    width: 100%;
    margin-top: 16px;
    padding: 10px 24px;
    background: #f8f4f0;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 24px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: 0.2s;
    box-sizing: border-box;
}
.calendar-footer-info:hover {
    background: #f5efe8;
    border-color: #d5cdc4;
}
.calendar-footer-info .info-item {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    white-space: nowrap;
}
.calendar-footer-info .info-item .label {
    color: var(--text-muted);
    font-weight: 400;
}
.calendar-footer-info .info-item .value {
    color: var(--text-primary);
    font-weight: 600;
}
.calendar-footer-info .info-divider {
    color: #d5cdc4;
    font-weight: 300;
    user-select: none;
}
@media (max-width: 768px) {
    .calendar-footer-info {
        padding: 8px 16px;
        gap: 4px 14px;
        font-size: 0.78rem;
        justify-content: flex-start;
        border-radius: 12px;
    }
    .calendar-footer-info .info-item { white-space: normal; word-break: break-all; }
    .calendar-footer-info .info-divider { display: none; }
}
@media (max-width: 480px) {
    .calendar-footer-info {
        padding: 6px 12px;
        gap: 3px 10px;
        font-size: 0.7rem;
        flex-direction: column;
        align-items: flex-start;
    }
    .calendar-footer-info .info-item { width: 100%; }
}

/* ================================================================
   择日筛选页 (select.html)
   ================================================================ */
/* 事项描述区 */
.event-desc-area {
    background: linear-gradient(135deg, #fff8f5 0%, #fff0e6 100%);
    border-left: 6px solid var(--sun-red);
    padding: 14px 20px;
    border-radius: 16px;
    margin-bottom: 16px;
}
.event-desc-area .event-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--sun-red);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
.event-desc-area .event-name .tutorial-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--sun-red);
    text-decoration: none;
    border: 1px solid var(--sun-red);
    padding: 2px 12px;
    border-radius: 30px;
    white-space: nowrap;
    transition: 0.2s;
}
.event-desc-area .event-name .tutorial-link:hover {
    background: var(--sun-red);
    color: #fff;
}
.event-desc-area .event-method {
    margin-top: 8px;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.8;
}
.event-desc-area .event-method strong { color: var(--text-primary); }

/* 筛选条件 */
.filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    font-size: 0.9rem;
    margin-bottom: 4px;
}
.filter-row .date-group {
    flex: 0 0 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-bottom: 8px;
}
.filter-row .date-group .date-sep {
    font-weight: 300;
    color: var(--text-muted);
    margin: 0 2px;
}
.filter-row input[type="date"] {
    padding: 6px 12px;
    height: 34px;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    font-size: 0.85rem;
    background: #fff;
    outline: none;
    transition: 0.2s;
    color: var(--text-primary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}
.filter-row input[type="date"]:focus {
    border-color: var(--sun-red);
    box-shadow: 0 0 0 3px rgba(235,19,19,0.08);
}
.filter-row .select-label {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    flex-shrink: 0;
    font-weight: 500;
}
.filter-row select {
    padding: 6px 12px;
    height: 34px;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    font-size: 0.85rem;
    background: #fff;
    outline: none;
    transition: 0.2s;
    color: var(--text-primary);
    min-width: 100px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}
.filter-row select:focus {
    border-color: var(--sun-red);
    box-shadow: 0 0 0 3px rgba(235,19,19,0.08);
}
.filter-row .quick-btn {
    padding: 2px 12px;
    height: 28px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    background: #fff;
    font-size: 0.8rem;
    cursor: pointer;
    transition: 0.2s;
    color: var(--text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.6;
}
.filter-row .quick-btn:hover {
    border-color: var(--sun-red);
    color: var(--sun-red);
    background: var(--sun-red-light);
}
.filter-row .quick-btn.active {
    background: var(--sun-red);
    color: #fff;
    border-color: var(--sun-red);
}
.filter-row .search-btn {
    padding: 4px 20px;
    height: 34px;
    border-radius: 30px;
    border: none;
    background: var(--sun-red);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.2s;
    flex-shrink: 0;
    line-height: 1.8;
    white-space: nowrap;
    margin-left: auto;
}

/* 标签组（筛选页/方法页） */
.tag-group {
    margin: 6px 0 2px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
}
.tag-group .tag-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    margin-top: 2px;
}
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
}
.tag-item {
    display: inline-block;
    padding: 4px 16px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--text-secondary);
    cursor: default;
    transition: 0.2s;
    user-select: none;
    line-height: 1.6;
}
.tag-item.good {
    border-color: #b8d9b0;
    color: #2e7d32;
    background: #edf7ea;
}
.tag-item.bad {
    border-color: #f0c8c8;
    color: #a05050;
    background: #f7ecec;
}
.tag-item.fierce {
    border-color: #e6b8a0;
    color: #8a5a3a;
    background: #f5ede6;
}
.tag-item.active {
    background: var(--sun-red);
    color: #fff;
    border-color: var(--sun-red);
}

.tag-empty {
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 2px 0;
}

/* 结果卡片两列 */
.result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 10px;
}
.result-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    padding: 16px 20px;
    transition: box-shadow 0.2s, transform 0.1s;
    line-height: 1.7;
}
.result-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}
.result-card .card-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
    margin-bottom: 2px;
}
.result-card .card-date {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
}
.result-card .card-week {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.result-card .card-lunar {
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.result-card .card-chong {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.result-card .card-jieqi {
    font-size: 0.85rem;
    color: var(--sun-red);
    font-weight: 500;
}
.result-card .card-ganzhi-nayin {
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.result-card .card-ganzhi-nayin .ganzhi {
    font-weight: 500;
    color: var(--text-primary);
}
.result-card .card-ganzhi-nayin .nayin { color: var(--text-muted); }
.result-card .card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.result-card .card-meta .label {
    color: var(--text-muted);
    font-weight: 400;
}
.result-card .card-meta .value { color: var(--text-primary); }
.result-card .card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 3px 8px;
    margin: 2px 0;
    align-items: center;
    padding-bottom: 6px;
    border-bottom: 2px dashed #ccc;
}
.result-card .card-tags:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.result-card .card-tags .label {
    color: var(--text-muted);
    font-weight: 500;
    margin-right: 2px;
    font-size: 0.75rem;
    min-width: 28px;
}
.result-card .card-tags .god-tag {
    display: inline-block;
    padding: 0 6px;
    border-radius: 4px;
    font-weight: 400;
    border: none;
    line-height: 1.6;
    font-size: 0.7rem;
    background: transparent;
    color: var(--text-secondary);
    transition: 0.2s;
}
.result-card .card-tags .god-tag.good {
    color: #3a6b3a;
    background: #edf7ea;
}
.result-card .card-tags .god-tag.bad {
    color: #a05050;
    background: #f7ecec;
}
.result-card .card-tags .god-tag.fierce {
    color: #8a5a3a;
    background: #f5ede6;
    font-weight: 600;
}
.result-card .card-tags .god-tag.yi {
    color: #3a6b3a;
    background: #edf7ea;
}
.result-card .card-tags .god-tag.ji {
    color: #a05050;
    background: #f7ecec;
}
.result-card .card-tags .god-tag.highlighted {
    border: 1px solid #f5a623 !important;
    background: #fef7e0 !important;
    box-shadow: 0 0 0 1px #f5a623;
    color: #8a6d3b !important;
    font-weight: 700;
}
.detail-link {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-decoration: none;
    margin-left: auto;
    white-space: nowrap;
}
.detail-link:hover {
    color: var(--sun-red);
    text-decoration: underline;
}

/* ===== 分页 ===== */
.pagination-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 18px;
    flex-wrap: wrap;
}
.pagination-wrap .page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    background: #fff;
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: 0.2s;
    user-select: none;
    text-decoration: none;
}
.pagination-wrap .page-btn:hover {
    border-color: var(--sun-red);
    color: var(--sun-red);
}
.pagination-wrap .page-btn.active {
    background: var(--sun-red);
    color: #fff;
    border-color: var(--sun-red);
}
.pagination-wrap .page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}
.pagination-wrap .page-info {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0 8px;
}
.pagination-wrap .ellipsis {
    color: var(--text-muted);
    padding: 0 4px;
}

/* ===== 侧边栏通用 ===== */
.sidebar-card .today-yiji .yi-item {
    font-size: 0.85rem;
    padding: 2px 0;
}
.sidebar-card .today-yiji .yi-item .label {
    font-weight: 600;
    display: inline-block;
    width: 24px;
}
.sidebar-card .today-yiji .yi-item .yi-text { color: #2e7d32; }
.sidebar-card .today-yiji .yi-item .ji-text { color: #b91c1c; }
.sidebar-card .article-link {
    display: block;
    font-size: 0.85rem;
    padding: 4px 0;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 1px dashed #f5f0eb;
}
.sidebar-card .article-link:last-child { border-bottom: none; }
.sidebar-card .article-link:hover { color: var(--sun-red); }

/* ===== 本月吉日快速入口（侧边栏） ===== */
.date-link-group {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}
.date-link-group:last-child { border-bottom: none; }
.date-link-group .group-title {
    flex: 0 0 80px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--sun-red);
    white-space: nowrap;
}
.date-link-group .items-wrap {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px 6px;
}
.date-link-group .link-item {
    display: inline-block;
    background: var(--bg-light);
    padding: 2px 8px;
    border-radius: 30px;
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-decoration: none;
    border: 1px solid var(--border-color);
    transition: 0.2s;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.date-link-group .link-item:hover {
    border-color: var(--sun-red);
    color: var(--sun-red);
}

/* ===== 侧边栏文章列表 ===== */
/* 与八字/民俗工具模块列表项样式保持一致（hover 高亮 + 圆角） */
.sidebar-list-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    border-bottom: none;
    text-decoration: none;
    transition: 0.15s;
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.5;
}
.sidebar-list-item:last-child { border-bottom: none; }
.sidebar-list-item .rank-num {
    flex-shrink: 0;
    width: 20px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--sun-red);
}
.sidebar-list-item .rank-num.top1 { color: #ff4d4f; font-weight: 700; }
.sidebar-list-item .rank-num.top2 { color: #fa8c16; font-weight: 700; }
.sidebar-list-item .rank-num.top3 { color: #faad14; font-weight: 700; }
.sidebar-list-item .item-title {
    flex: 1;
    color: inherit;
    font-size: 0.8rem;
    line-height: 1.5;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-list-item:hover { background: var(--bg-light); color: var(--sun-red); }
.sidebar-list-item .item-title:hover { color: var(--sun-red); }
.sidebar-list-item .item-meta {
    flex-shrink: 0;
    font-size: 0.72rem;
    color: var(--text-muted);
}
.date-text { white-space: nowrap; }

/* ===== 工具紧凑布局（侧边栏，与八字/民俗“常用工具”栏目一致） ===== */
.tools-compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
.tools-compact .tool-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border-radius: 8px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.78rem;
    transition: 0.2s;
}
.tools-compact .tool-item:hover {
    border-color: var(--sun-red);
    color: var(--sun-red);
    background: #fff;
}
.tools-compact .tool-item .tool-icon {
    font-size: 1rem;
    line-height: 1.2;
}
.tools-compact .tool-item .tool-name {
    font-size: 0.78rem;
    line-height: 1.2;
}
@media (max-width: 480px) {
    .tools-compact { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ===== 商城商品网格（select.html 侧边栏） ===== */
.shop-grid-4 {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 16px !important;
}
.shop-grid-4 .shop-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    padding: 16px 12px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}
.shop-grid-4 .shop-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
.shop-grid-4 .shop-card .shop-img {
    font-size: 2.8rem;
    display: block;
    margin-bottom: 6px;
}
.shop-grid-4 .shop-card .shop-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}
.shop-grid-4 .shop-card .shop-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 2px 0 6px;
}
.shop-grid-4 .shop-card .shop-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--sun-red);
    margin-bottom: 8px;
}
.shop-grid-4 .shop-card .shop-btn {
    width: 100%;
    padding: 6px 0;
    border: none;
    border-radius: 30px;
    background: var(--sun-red);
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
}
.shop-grid-4 .shop-card .shop-btn:hover {
    background: var(--sun-red-dark);
}
@media (max-width: 992px) {
    .shop-grid-4 { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 576px) {
    .shop-grid-4 { grid-template-columns: 1fr !important; }
}

/* ===== 左右布局（method.html） ===== */
.main-layout {
    display: flex !important;
    gap: 32px !important;
    margin-top: 12px !important;
}
.main-content {
    flex: 1 !important;
    min-width: 0 !important;
}
.sidebar {
    flex: 0 0 340px !important;
    max-width: 340px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
}
@media (max-width: 992px) {
    .main-layout { flex-direction: column !important; }
    .sidebar { flex: 1 1 100% !important; max-width: 100% !important; }
}

/* ================================================================
   响应式微调
   ================================================================ */
@media (max-width: 768px) {
    .calendar-main { padding: 16px; }
    .calendar-header h2 { font-size: 1.2rem; }
    .calendar-grid { gap: 12px; }
    .date-quick-nav a { font-size: 0.75rem; padding: 2px 10px; }
    .god-list { grid-template-columns: 1fr; }
    .day-number { font-size: 28px; }
    .nav-arrow { width: 30px; height: 30px; font-size: 1rem; }
    .el-select, .el-input {
        font-size: 0.75rem;
        padding: 4px 20px 4px 10px;
        min-width: 80px;
    }
    .time-table-wrap table { font-size: 0.75rem; min-width: 560px; }
    .time-table-wrap td { padding: 8px 6px; }
    .calendar-actions { width: 100%; justify-content: flex-end; }
    .filter-row {
        gap: 4px 8px;
        font-size: 0.8rem;
    }
    .filter-row input[type="date"], .filter-row select {
        font-size: 0.7rem;
        height: 28px;
        padding: 0 6px;
        width: 100%;
        min-width: 80px;
    }
    .filter-row .quick-btn { font-size: 0.65rem; height: 24px; padding: 0 8px; }
    .filter-row .search-btn, .filter-row .reset-btn {
        font-size: 0.75rem;
        height: 28px;
        padding: 0 14px;
    }
    .event-desc-area .event-name { font-size: 1.2rem; }
    .result-grid { grid-template-columns: 1fr; gap: 14px; }
    .result-card { padding: 14px 16px; }
    .tag-group .tag-label { font-size: 0.8rem; }
    .tag-item { font-size: 0.75rem; padding: 2px 12px; }
    .date-link-group .items-wrap { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .calendar-header { flex-direction: column; align-items: stretch; gap: 8px; }
    .calendar-actions { justify-content: stretch; }
    .calendar-actions .el-select, .calendar-actions .el-input { flex: 1; min-width: 0; }
    .day-number { font-size: 24px; }
    .date-selector { gap: 6px; }
    .el-select { font-size: 0.7rem; padding: 2px 18px 2px 8px; min-width: 40px; }
    .time-table-wrap table { font-size: 0.6rem; min-width: 480px; }
    .time-table-wrap th, .time-table-wrap td { padding: 4px 3px; }
    .result-card { padding: 12px 14px; }
    .result-card .card-date { font-size: 1rem; }
    .filter-row input[type="date"], .filter-row select { width: 90px; font-size: 0.65rem; }
    .date-link-group { flex-wrap: wrap; }
    .date-link-group .group-title { flex: 0 0 100%; }
    .date-link-group .items-wrap { grid-template-columns: repeat(2, 1fr); }
}



/* ===== 标签页导航 ===== */
.tab-headers {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 24px;
    padding-bottom: 2px;
}
.tab-headers .tab-btn {
    padding: 10px 24px;
    border-radius: 30px 30px 0 0;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: 0.2s;
}
.tab-headers .tab-btn:hover {
    background: var(--sun-red-light);
    color: var(--sun-red);
}
.tab-headers .tab-btn.active {
    background: var(--sun-red);
    color: #fff;
    box-shadow: 0 4px 12px rgba(235,19,19,0.2);
}

.tab-content { display: none; animation: fadeIn 0.25s ease; }
.tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ===== 卡片 & 面板 ===== */
.card-panel {
    background: white;
    border-radius: 28px;
    padding: 24px 28px;
    border: 1px solid var(--border-color);
    margin-bottom: 24px;
}
.card-panel h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 16px;
    border-left: 6px solid var(--sun-red);
    padding-left: 16px;
}
.card-panel h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 16px 0 8px;
}

/* ===== 表格 ===== */
.table-wrap {
    overflow-x: auto;
    margin: 16px 0 8px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}
.table-wrap table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    background: #fff;
    min-width: 600px;
}
.table-wrap th {
    background: #faf2ec;
    font-weight: 700;
    color: var(--text-primary);
    padding: 10px 12px;
    border-bottom: 2px solid var(--border-color);
    text-align: left;
    white-space: nowrap;
}
.table-wrap td {
    padding: 8px 12px;
    border-bottom: 1px solid #f0ebe6;
    vertical-align: middle;
}
.table-wrap tr:last-child td { border-bottom: none; }
.table-wrap td[colspan] { text-align: center; }

/* ===== 左右布局 ===== */
.main-layout {
    display: flex;
    gap: 32px;
    margin-top: 12px;
}
.main-content {
    flex: 1;
    min-width: 0;
}
.sidebar {
    flex: 0 0 340px;
    max-width: 340px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
@media (max-width: 992px) {
    .main-layout { flex-direction: column; }
    .sidebar { flex: 1 1 100%; max-width: 100%; }
}
@media (max-width: 768px) {
    .container { padding: 0 16px; }
    .card-panel { padding: 16px; }
    .tab-headers .tab-btn { padding: 6px 14px; font-size: 0.8rem; }
    .table-wrap table { font-size: 0.75rem; min-width: 400px; }
    .table-wrap th, .table-wrap td { padding: 6px 8px; }
    .sidebar { flex: 1 1 100%; max-width: 100%; }
}
@media (max-width: 480px) {
    .tab-headers .tab-btn { padding: 4px 10px; font-size: 0.7rem; }
    .table-wrap table { font-size: 0.65rem; min-width: 300px; }
}

/* ===== 侧边栏（统一使用 common.css / article.css 公共样式，不再自定义卡片） ===== */
.calendar-date-display {
    text-align: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 10px;
}
.calendar-gregorian {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
}
.calendar-gregorian .year { color: var(--sun-red); }
.calendar-weekday {
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.calendar-lunar-info {
    text-align: center;
    padding: 6px 0 10px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 10px;
}
.calendar-lunar-info .lunar-date {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--sun-red);
}
.calendar-lunar-info .lunar-ganzhi {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.calendar-today-info {
    padding: 4px 0 8px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 8px;
}
.calendar-yiji {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.calendar-yiji .yi, .calendar-yiji .ji {
    flex: 1;
    min-width: 80px;
    font-size: 0.75rem;
    line-height: 1.6;
}
.calendar-yiji .label {
    display: inline-block;
    width: 18px;
    font-weight: 700;
    color: var(--text-muted);
}
.calendar-yiji .yi .label { color: #16a34a; }
.calendar-yiji .ji .label { color: #dc2626; }
.calendar-chong {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 3px;
}
.calendar-chong .label {
    font-weight: 600;
    color: var(--text-secondary);
    margin-right: 4px;
}
.calendar-gods {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    padding: 6px 0 10px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 10px;
    gap: 4px;
}
.calendar-gods .god-item {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.calendar-gods .god-item em {
    font-style: normal;
    font-weight: 600;
    color: var(--sun-red);
}
.calendar-choose-types {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
}
.calendar-choose-types .choose-tag {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 4px 2px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background: #fff;
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
    line-height: 1.4;
}
.calendar-choose-types .choose-tag:hover {
    border-color: var(--sun-red);
    background: var(--sun-red-light);
    color: var(--sun-red);
}
@media (max-width: 768px) {
    .calendar-choose-types { grid-template-columns: repeat(4, 1fr); gap: 4px; }
    .calendar-choose-types .choose-tag { font-size: 0.65rem; padding: 3px 2px; }
}
@media (max-width: 480px) {
    .calendar-choose-types { grid-template-columns: repeat(3, 1fr); }
}

/* ===== 标签列表 ===== */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
}
.tag-list .tag-item {
    display: inline-block;
    padding: 2px 12px;
    border-radius: 30px;
    font-size: 0.8rem;
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--text-secondary);
    cursor: default;
    user-select: none;
}
.tag-item.good { border-color: #b8d9b0; color: #3a6b3a; background: #edf7ea; }
.tag-item.bad { border-color: #f0c8c8; color: #a05050; background: #f7ecec; }
.tag-item.fierce { border-color: #e6b8a0; color: #8a5a3a; background: #f5ede6; }

/* ===== 页脚 ===== */
footer {
    background: #1f1e1c;
    color: #cfcbc4;
    padding: 32px 0 20px;
    margin-top: 48px;
}
footer .footer-copyright {
    text-align: center;
    font-size: 0.85rem;
    color: #8a847a;
    border-top: 1px solid #33302e;
    padding-top: 16px;
}
.ref-box {
    background: #fef7e8;
    border-radius: 20px;
    padding: 20px 24px;
    border-left: 6px solid var(--sun-red);
    margin: 16px 0;
}
.ref-box p { margin: 0; font-size: 0.9rem; color: var(--text-secondary); }
.ref-box strong { color: var(--text-primary); }

/* 侧边栏文章列表（与八字/民俗工具模块列表项样式一致） */
.sidebar-list-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    border-bottom: none;
    text-decoration: none;
    transition: 0.15s;
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.5;
}
.sidebar-list-item:last-child {
    border-bottom: none;
}
.sidebar-list-item .rank-num {
    flex-shrink: 0;
    width: 20px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--sun-red);
}
.sidebar-list-item .rank-num.top1 { color: #ff4d4f; font-weight: 700; }
.sidebar-list-item .rank-num.top2 { color: #fa8c16; font-weight: 700; }
.sidebar-list-item .rank-num.top3 { color: #faad14; font-weight: 700; }
.sidebar-list-item .item-title {
    flex: 1;
    color: inherit;
    font-size: 0.8rem;
    line-height: 1.5;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-list-item:hover { background: var(--bg-light); color: var(--sun-red); }
.sidebar-list-item .item-title:hover {
    color: var(--sun-red);
}
.sidebar-list-item .item-meta {
    flex-shrink: 0;
    font-size: 0.72rem;
    color: var(--text-muted);
}
.date-text {
    white-space: nowrap;
}
/* 快速入口 */
.date-link-group {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}
.date-link-group:last-child {
    border-bottom: none;
}
.date-link-group .group-title {
    flex: 0 0 80px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--sun-red);
    white-space: nowrap;
}
.date-link-group .items-wrap {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px 6px;
}
.date-link-group .link-item {
    display: inline-block;
    background: var(--bg-light);
    padding: 2px 8px;
    border-radius: 30px;
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-decoration: none;
    border: 1px solid var(--border-color);
    transition: 0.2s;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.date-link-group .link-item:hover {
    border-color: var(--sun-red);
    color: var(--sun-red);
}
/* 工具（与八字/民俗“常用工具”栏目一致：2 列圆角胶囊） */
.tools-compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
.tools-compact .tool-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border-radius: 8px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    font-size: 0.78rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: 0.2s;
}
.tools-compact .tool-item:hover {
    border-color: var(--sun-red);
    color: var(--sun-red);
    background: #fff;
}

/* ================================================================
   recommend.html 及 select.html 特有样式（已整合）
   ================================================================ */

/* 筛选区域（label + select 同一行） */
.filter-area {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 16px 20px;
    background: #fff;
    padding: 14px 24px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin-bottom: 24px;
}
.filter-area .filter-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex: 1 1 0;
    min-width: 0;
}
.filter-area .filter-group:first-child {
    flex: 0 0 130px;
}
.filter-area .filter-group label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.3px;
    white-space: nowrap;
    flex-shrink: 0;
}
.filter-area .filter-group select {
    padding: 6px 12px;
    height: 38px;
    border: 1.5px solid #dcdfe6;
    border-radius: 10px;
    font-size: 0.9rem;
    background: #fafafa;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    color: var(--text-primary);
    appearance: auto;
    flex: 1 1 auto;
}
.filter-area .filter-group select:focus {
    border-color: var(--sun-red);
    box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.12);
    background: #fff;
}
.filter-area .filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
    margin-left: auto;
}
.filter-area .filter-actions .search-btn,
.filter-area .filter-actions .reset-btn {
    /* 复用 .filter-row 中的按钮样式，此处无需重复定义 */
}

/* 页面顶部标题+操作按钮 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin-bottom: 8px;
}
.page-header .header-left h2 {
    font-size: 2rem;
    font-weight: 800;
    margin: 0;
}
.page-header .header-right {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.page-header .header-right .btn-link {
    padding: 6px 18px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    transition: 0.2s;
    white-space: nowrap;
    line-height: 1.4;
}
.page-header .header-right .btn-link:hover {
    border-color: var(--sun-red);
    color: var(--sun-red);
    background: var(--sun-red-light);
}
.page-header .header-right .btn-link.primary {
    background: var(--sun-red);
    color: #fff;
    border-color: var(--sun-red);
}
.page-header .header-right .btn-link.primary:hover {
    background: var(--sun-red-dark);
}

/* select.html 事项名称区域（右侧操作链接） */
.event-desc-area .event-name .action-links {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin-left: auto;
}
.event-desc-area .event-name .tutorial-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--sun-red);
    text-decoration: none;
    border: 1.5px solid var(--sun-red);
    padding: 4px 16px;
    border-radius: 30px;
    white-space: nowrap;
    transition: all 0.25s ease;
    background: transparent;
    line-height: 1.6;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.event-desc-area .event-name .tutorial-link:hover {
    background: var(--sun-red);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(184, 134, 11, 0.25);
}

/* 响应式微调 */
@media (max-width: 992px) {
    .filter-area { flex-wrap: wrap; gap: 12px; }
    .filter-area .filter-group:first-child { flex: 1 1 100%; }
    .filter-area .filter-actions { margin-left: 0; justify-content: stretch; flex-wrap: wrap; }
    .filter-area .filter-actions .search-btn,
    .filter-area .filter-actions .reset-btn { flex: 1; text-align: center; }
    .page-header { flex-direction: column; align-items: stretch; }
    .page-header .header-right { justify-content: stretch; }
}
@media (max-width: 768px) {
    .filter-area { flex-direction: column; align-items: stretch; padding: 12px 16px; }
    .filter-area .filter-group { width: 100%; flex: 1 1 auto; }
    .filter-area .filter-actions { flex-wrap: wrap; }
    .filter-area .filter-actions .search-btn,
    .filter-area .filter-actions .reset-btn { flex: 1 0 auto; min-width: 80px; }
    .event-desc-area .event-name { flex-wrap: wrap; gap: 8px 12px; }
    .event-desc-area .event-name .action-links { margin-left: 0; flex-wrap: wrap; }
    .event-desc-area .event-name .tutorial-link { font-size: 0.8rem; padding: 2px 12px; }
}
@media (max-width: 480px) {
    .filter-area .filter-actions { flex-direction: column; width: 100%; }
    .filter-area .filter-actions .search-btn,
    .filter-area .filter-actions .reset-btn { width: 100%; }
    .page-header .header-right .btn-link { flex: 1; text-align: center; }
    .event-desc-area .event-name .action-links { width: 100%; justify-content: flex-start; }
}

/* ===== 事项名称区域：系统推荐 + 查看教程 在右侧 ===== */
.event-desc-area .event-name {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 12px 20px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--sun-red);
}
.event-desc-area .event-name .event-title {
    flex: 0 1 auto;
    white-space: nowrap;
}
.event-desc-area .event-name .action-links {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin-left: auto;
}
.event-desc-area .event-name .tutorial-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--sun-red);
    text-decoration: none;
    border: 1.5px solid var(--sun-red);
    padding: 4px 16px;
    border-radius: 30px;
    white-space: nowrap;
    transition: all 0.25s ease;
    background: transparent;
    line-height: 1.6;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.event-desc-area .event-name .tutorial-link:hover {
    background: var(--sun-red);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(184, 134, 11, 0.25);
}
.event-desc-area .event-name .tutorial-link:active {
    transform: translateY(0);
}
/* 响应式：小屏幕时换行 */
@media (max-width: 640px) {
    .event-desc-area .event-name {
        flex-wrap: wrap;
        gap: 8px 12px;
    }
    .event-desc-area .event-name .action-links {
        margin-left: 0;
        flex-wrap: wrap;
    }
    .event-desc-area .event-name .tutorial-link {
        font-size: 0.8rem;
        padding: 2px 12px;
    }
}
@media (max-width: 480px) {
    .event-desc-area .event-name .action-links {
        width: 100%;
        justify-content: flex-start;
    }
}
.tutorial-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--sun-red);
    text-decoration: none;
    border: 1.5px solid var(--sun-red);
    padding: 4px 16px;
    border-radius: 30px;
    white-space: nowrap;
    transition: all 0.25s ease;
    background: transparent;
    line-height: 1.6;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.tutorial-link:hover {
    background: var(--sun-red);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(184, 134, 11, 0.25);
}

/* ===== 择日方式（传统/AI） + AI 表单 ===== */
/* 顶部过滤栏：择日方式在左，筛选/搜索在右，同行展示 */
.zeri-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 16px;
    padding: 10px 0 12px;
    border-bottom: 1px dashed #f0f0f0;
    margin-bottom: 12px;
}
.zeri-filter-bar .zeri-mode-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 0;
    border-bottom: none;
    margin: 0;
    flex-shrink: 0;
}
.zeri-mode-row .mode-title { font-size: .9rem; font-weight: 600; color: var(--text-primary); white-space: nowrap; }
.zeri-mode-group { display: inline-flex; align-items: center; gap: 6px; }
.zeri-mode-group label { font-size: .85rem; color: #555; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 3px; padding: 4px 14px; border: 1px solid #dcdfe6; border-radius: 16px; transition: all .15s; }
.zeri-mode-group label:has(input:checked) { background: var(--sun-red-light, #fdeeee); border-color: var(--sun-red); color: var(--sun-red); font-weight: 600; }
.zeri-mode-group input { margin: 0; }

.zeri-filter-items {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    justify-content: flex-end;
    flex: 1 1 auto;
    min-width: 0;
}
.zeri-filter-items .select-label {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    flex-shrink: 0;
    font-weight: 500;
    font-size: .85rem;
}
.zeri-filter-items .select-label select {
    padding: 5px 10px;
    height: 34px;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    font-size: .85rem;
    background: #fff;
    outline: none;
    color: var(--text-primary);
    min-width: 90px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}
.zeri-filter-items .select-label select:focus { border-color: var(--sun-red); box-shadow: 0 0 0 3px rgba(235,19,19,.08); }

.zeri-ai-field { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.zeri-ai-field .ai-label { font-size: .82rem; color: var(--text-secondary); white-space: nowrap; font-weight: 500; }
.zeri-ai-field select { padding: 5px 10px; height: 34px; border: 1px solid #dcdfe6; border-radius: 6px; font-size: .82rem; background: #fff; outline: none; color: var(--text-primary); min-width: 80px; }
.zeri-ai-field select:focus { border-color: var(--sun-red); box-shadow: 0 0 0 3px rgba(235,19,19,.08); }
.zeri-ai-btn { padding: 4px 20px; height: 34px; border-radius: 30px; border: none; background: linear-gradient(135deg,#5b7cfa,#4a66d8); color: #fff; font-weight: 600; font-size: .9rem; cursor: pointer; flex-shrink: 0; white-space: nowrap; }
.zeri-filter-items .search-btn,
.zeri-filter-items .reset-btn { height: 34px; border-radius: 30px; font-size: .9rem; font-weight: 600; cursor: pointer; flex-shrink: 0; white-space: nowrap; padding: 4px 18px; }
.zeri-filter-items .search-btn { border: none; background: var(--sun-red); color: #fff; }
.zeri-filter-items .reset-btn { background: #fff; color: var(--text-secondary); border: 1px solid var(--border-color); }
.zeri-filter-items .reset-btn:hover { border-color: var(--sun-red); color: var(--sun-red); }

/* 日期范围行（第二行） */
.filter-row .date-group { margin-bottom: 0; }

/* 生辰下拉组：与八字模块保持一致 */
.birth-select-group { display: flex; align-items: center; gap: 2px; }
.birth-select-group select {
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: .85rem;
    background: var(--bg-light);
    color: var(--text-primary);
    outline: none;
    height: 34px;
    min-width: 68px;
}
.birth-select-group select:focus { border-color: var(--sun-red); box-shadow: 0 0 0 3px rgba(235,19,19,.06); }
.birth-select-group .unit { font-size: .75rem; color: var(--text-muted); margin-right: 2px; }
.cf-panel .filter-input-row { gap: 12px 18px; }

@media (max-width: 1100px) {
    .zeri-filter-bar { gap: 10px 12px; }
    .zeri-filter-items { justify-content: flex-start; width: 100%; }
}
@media (max-width: 768px) {
    .zeri-filter-bar { flex-direction: column; align-items: stretch; }
    .zeri-filter-items { justify-content: flex-start; }
    .birth-select-group select { min-width: 60px; font-size: .78rem; }
}
.zeri-ai-btn:hover { transform: translateY(-1px); box-shadow: 0 2px 8px rgba(74,102,216,.35); }
.zeri-ai-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* ===== AI 流式结果 ===== */
.zeri-ai-result { display: none; margin-top: 14px; background: #fff; border: 1px solid #eee; border-radius: 12px; padding: 18px 20px; box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.zeri-live-status { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: linear-gradient(135deg,#667eea,#764ba2); color: #fff; border-radius: 10px; margin-bottom: 12px; font-size: .85rem; }
.zeri-live-status .zeri-spin { display: inline-block; width: 16px; height: 16px; border: 2px solid #fff; border-top-color: transparent; border-radius: 50%; animation: zeri-spin .8s linear infinite; }
@keyframes zeri-spin { to { transform: rotate(360deg); } }
.zeri-live-content { min-height: 120px; line-height: 1.8; }
.zeri-live-content .bz-wrap, .zeri-live-content h2, .zeri-live-content h3, .zeri-live-content p, .zeri-live-content table { max-width: 100%; overflow-wrap: break-word; }
.zeri-ai-error { padding: 18px; text-align: center; color: #c62828; font-size: 14px; background: #ffebee; border-radius: 10px; }
.zeri-ai-tk { margin-top: 8px; padding: 4px 12px; background: #f0f4f8; border-radius: 20px; text-align: right; font-size: .75rem; color: #89a; }

/* ===== 逐月吉日表格（recommend 页） ===== */
.month-col { font-weight: 600; color: #333; white-space: nowrap; min-width: 56px; }
.ganzhi-link { display: inline-block; padding: 1px 5px; margin: 0 1px; border-radius: 4px; font-size: .9rem; }
.ganzhi-link.has-date { color: #1a3c8a; background: #eef4ff; border: 1px solid #cfe0f5; cursor: pointer; text-decoration: none; font-weight: 600; }
.ganzhi-link.has-date:hover { background: #dce9ff; border-color: #4a66d8; }
.ganzhi-link.no-date { color: #999; }

/* ===== 择日赋文（原文 + 白话 + 横线分割） ===== */
.fu-wen { background: #fdf8ef; border: 1px solid #f0e3c8; border-radius: 12px; padding: 16px 18px; margin: 8px 0 16px; }
.fu-wen h3 { color: #8a6d3b; font-size: 1.05rem; margin: 0 0 10px; }
.fu-wen .fu-yuanwen { color: #5a4630; line-height: 1.9; font-size: .92rem; }
.fu-wen .fu-baihua { color: #333; line-height: 1.9; font-size: .92rem; }
.fu-wen hr { border: none; border-top: 1px dashed #d8c49a; margin: 12px 0; }

/* ================================================================
   共享工具侧栏片段（tools/fragments/tool-sidebar）支持类
   与 tools/common.css 中 .bazi-sidebar 内部片段样式保持一致，
   使 calendar 模块（择日等）复用该片段时右侧栏目样式与八字/民俗模块统一。
   ================================================================ */
.tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tool-grid .tool-item {
    display: flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 8px;
    border: 1px solid var(--border-color); background: var(--bg-light);
    text-decoration: none; color: var(--text-secondary); font-size: 0.78rem; transition: 0.2s;
}
.tool-grid .tool-item:hover { border-color: var(--sun-red); color: var(--sun-red); background: #fff; }
.sidebar-list { display: flex; flex-direction: column; gap: 4px; }
.bazi-list-item {
    display: flex; align-items: flex-start; gap: 8px; padding: 6px 8px; border-radius: 6px;
    text-decoration: none; transition: 0.15s; color: var(--text-secondary); font-size: 0.8rem; line-height: 1.5;
}
.bazi-list-item:hover { background: var(--bg-light); color: var(--sun-red); }
.bazi-list-item .list-icon { flex-shrink: 0; width: 20px; text-align: center; font-weight: 600; color: var(--sun-red); font-size: 0.8rem; }
.bazi-list-item .list-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ================================================================
   右侧工具入口卡片（与八字模块 bz-related 保持一致）
   ================================================================ */
.tool-card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.tool-card-grid .tool-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 14px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: 0.2s;
    min-width: 0;
}
.tool-card-grid .tool-card:hover {
    border-color: var(--sun-red);
    box-shadow: 0 6px 16px rgba(235,19,19,.08);
    transform: translateY(-2px);
}
.tool-card-grid .tool-card.active {
    border-color: var(--sun-red);
    background: var(--sun-red-light);
}
.tool-card-grid .tool-card .tool-icon {
    font-size: 1.25rem;
    line-height: 1.2;
    flex: 0 0 auto;
}
.tool-card-grid .tool-card .tool-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.tool-card-grid .tool-card .tool-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: .92rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tool-card-grid .tool-card .tool-desc {
    font-size: .74rem;
    color: var(--text-muted);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
@media (max-width: 992px) {
    .tool-card-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
    .tool-card-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ================================================================
   与八字模块 filter-card 结构对齐后的补充样式
   ================================================================ */
.filter-input-row .quick-btn,
.filter-group .quick-btn {
    padding: 4px 12px;
    height: 30px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    background: #fff;
    font-size: 0.78rem;
    cursor: pointer;
    transition: 0.2s;
    color: var(--text-secondary);
    white-space: nowrap;
    line-height: 1.6;
}
.filter-input-row .quick-btn:hover,
.filter-group .quick-btn:hover {
    border-color: var(--sun-red);
    color: var(--sun-red);
    background: var(--sun-red-light);
}
.filter-input-row .quick-btn.active,
.filter-group .quick-btn.active {
    background: var(--sun-red);
    color: #fff;
    border-color: var(--sun-red);
}
.tool-grid .tool-item.active {
    border-color: var(--sun-red);
    color: var(--sun-red);
    background: #fff;
}
/* 让择日结果面板与八字模块保持一致的顶部间距 */
.result-panel { margin-top: 16px; }
