.hd-page {
    max-width: 1080px;
    margin: 0 auto;
    color: #2f365f;
}

.hd-header {
    position: relative;
    overflow: hidden;
    margin-bottom: 22px;
    padding: 26px 28px;
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(255, 210, 120, 0.42), transparent 36%),
        linear-gradient(135deg, #fff7df 0%, #fffaf1 45%, #eef2ff 100%);
    border: 1px solid rgba(166, 120, 35, 0.18);
    box-shadow: 0 18px 42px rgba(73, 49, 15, 0.12);
}

.hd-header::after {
    content: "";
    position: absolute;
    right: -42px;
    bottom: -46px;
    width: 150px;
    height: 150px;
    border: 24px solid rgba(155, 100, 23, 0.08);
    border-radius: 50%;
}

.hd-header h2 {
    margin-bottom: 8px;
    color: #7a4f12;
    font-size: 2em;
}

.hd-header p {
    max-width: 660px;
    color: #667085;
    line-height: 1.7;
}

.hd-filter-card {
    position: relative;
    padding: 24px;
    border-radius: 24px;
    background: rgba(255, 253, 248, 0.96);
    border: 1px solid rgba(231, 216, 191, 0.9);
    box-shadow: 0 16px 36px rgba(107, 72, 18, 0.1);
    backdrop-filter: blur(10px);
}

.hd-form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.hd-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #344054;
    font-weight: bold;
}

.hd-field > span {
    color: #7a4f12;
    font-size: 0.92em;
    letter-spacing: 0.02em;
}

.hd-field span strong {
    color: #d92d20;
}

.hd-field input,
.hd-field select {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid #d9d4c8;
    border-radius: 16px;
    background: linear-gradient(180deg, #fff 0%, #fffaf2 100%);
    color: #2f365f;
    font-size: 1em;
    outline: none;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.hd-suit-field {
    justify-content: flex-start;
}

.hd-radio-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.hd-radio-option {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border: 1px solid #d9d4c8;
    border-radius: 16px;
    background: linear-gradient(180deg, #fff 0%, #fffaf2 100%);
    color: #7a4f12;
    cursor: pointer;
    font-weight: bold;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.hd-radio-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.hd-radio-option:has(input:checked) {
    border-color: #9b6417;
    background: linear-gradient(135deg, #9b6417 0%, #d99a35 100%);
    color: #fff;
    box-shadow: 0 10px 22px rgba(155, 100, 23, 0.22);
}

.hd-field input:focus,
.hd-field select:focus {
    border-color: #d79b36;
    box-shadow: 0 0 0 4px rgba(215, 155, 54, 0.14);
    transform: translateY(-1px);
}

.hd-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 22px;
}

.hd-actions .option-btn {
    border-radius: 999px;
    padding: 12px 24px;
    font-size: 1.02em;
    box-shadow: 0 10px 24px rgba(73, 49, 15, 0.12);
}

.hd-search-btn {
    background: linear-gradient(135deg, #8b5a13 0%, #c0822a 100%);
    border-color: #c0822a;
    color: #fff;
}

.hd-search-btn:hover {
    background: #7a4f12;
    border-color: #7a4f12;
}

.hd-reset-btn {
    background: #fff8eb;
    border-color: #e7d8bf;
    color: #7a4f12;
}

.hd-note {
    display: inline-flex;
    align-items: center;
    margin-top: 16px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 244, 221, 0.9);
    color: #8a6a3d;
    font-size: 0.9em;
    line-height: 1.6;
}

.hd-result-summary {
    display: inline-flex;
    align-items: center;
    margin: 20px 2px 14px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0,0,0,0.18);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.28);
}

.hd-result-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 18px;
}

.hd-day-card,
.hd-empty {
    border-radius: 24px;
    background: #fff;
    border: 1px solid rgba(236, 230, 216, 0.92);
    box-shadow: 0 16px 34px rgba(23, 24, 35, 0.11);
}

.hd-day-card {
    position: relative;
    overflow: hidden;
    padding: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hd-day-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 5px;
    background: linear-gradient(90deg, #9b6417, #d99a35, #667eea);
}

.hd-day-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 48px rgba(23, 24, 35, 0.16);
}

.hd-empty {
    padding: 24px;
    color: #667085;
    text-align: center;
    line-height: 1.7;
}

.hd-day-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 0;
    padding: 22px 22px 16px;
    background: linear-gradient(135deg, #fff8eb 0%, #f7f8ff 100%);
}

.hd-solar {
    color: #1f2937;
    font-size: 1.46em;
    font-weight: bold;
    letter-spacing: 0.02em;
}

.hd-lunar {
    margin-top: 6px;
    color: #8a6a3d;
    font-size: 0.96em;
}

.hd-hour-btn {
    flex-shrink: 0;
    border: none;
    border-radius: 999px;
    padding: 10px 17px;
    background: #fff;
    color: #7a4f12;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 8px 18px rgba(107, 72, 18, 0.12);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.hd-hour-btn:hover {
    background: #9b6417;
    color: #fff;
    transform: translateY(-1px);
}

.hd-ganzhi-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin: 14px 18px;
    overflow-x: auto;
}

.hd-ganzhi-row span {
    flex: 1;
    min-width: 0;
    padding: 5px 8px;
    border-radius: 999px;
    background: #f6f7ff;
    color: #5060c8;
    font-size: 0.86em;
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
}

.hd-text-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px;
    margin: 10px 18px;
    padding: 12px 14px;
    border-radius: 16px;
    background: #fbfaf6;
    line-height: 1.8;
}

.hd-text-row.good {
    background: #f0fdf4;
}

.hd-text-row.bad {
    background: #fff7ed;
}

.hd-text-row span {
    color: #3f4657;
}

.hd-text-row.good strong,
.hd-hour-detail.good strong {
    color: #16803c;
}

.hd-text-row.bad strong,
.hd-hour-detail.bad strong {
    color: #c2410c;
}

.hd-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 18px;
    padding: 14px;
    border-radius: 18px;
    background: linear-gradient(180deg, #fbfaf6 0%, #fff 100%);
    border: 1px solid #f0e8da;
    color: #48505f;
}

.hd-meta-grid span {
    padding: 8px 10px;
    border-radius: 12px;
    background: #fff;
    box-shadow: inset 0 0 0 1px #f0e8da;
}

.hd-meta-grid strong {
    color: #2f365f;
}

.hd-hour-modal {
    position: fixed;
    inset: 0;
    z-index: 2600;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.58);
}

.hd-hour-modal.active {
    display: flex;
}

.hd-hour-panel {
    width: min(760px, 100%);
    max-height: 84vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 20px;
    background: #fffdf8;
    box-shadow: 0 20px 60px rgba(0,0,0,0.28);
}

.hd-hour-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px;
    border-bottom: 1px solid #ece6d8;
    background: linear-gradient(180deg, #fff7df 0%, #fffdf8 100%);
}

.hd-hour-header h3 {
    color: #7a4f12;
    margin-bottom: 6px;
    font-size: 1.45em;
}

.hd-hour-header p {
    color: #667085;
    line-height: 1.6;
}

.hd-hour-close {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #f5efe5;
    color: #7a4f12;
    cursor: pointer;
    font-size: 1.4em;
    flex-shrink: 0;
}

.hd-hour-list {
    display: grid;
    gap: 12px;
    padding: 18px 20px;
    overflow-y: auto;
}

.hd-hour-item {
    padding: 14px 16px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #ece6d8;
}

.hd-hour-name {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 8px;
}

.hd-hour-name strong {
    color: #2f365f;
    font-size: 1.12em;
}

.hd-hour-name span,
.hd-hour-detail {
    color: #667085;
    line-height: 1.7;
}

@media (max-width: 768px) {
    .hd-form-grid,
    .hd-meta-grid {
        grid-template-columns: 1fr;
    }

    .hd-filter-card,
    .hd-header {
        padding: 18px;
    }

    .hd-result-list {
        grid-template-columns: 1fr;
    }

    .hd-actions,
    .hd-day-top {
        flex-direction: column;
        align-items: stretch;
    }

    .hd-hour-btn,
    .hd-actions .option-btn {
        width: 100%;
    }

    .hd-text-row {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .hd-hour-modal {
        padding: 12px;
    }
}
