.tool-form-constellation {
    max-width: none;
    width: 100%;
}

.tool-form-constellation .xz-calendar-note {
    margin: 0 0 1rem;
    padding: 0.7rem 0.95rem;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: #4b5563;
    background: #f8fafc;
    border: 1px solid #e8edf3;
    border-radius: 8px;
}

.tool-form-constellation .xz-panel {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eef2f7;
}

.tool-form-constellation .xz-panel:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.tool-form-constellation .xz-panel-title {
    margin: 0 0 0.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1f2937;
}

.tool-form-constellation .xz-query-wrap {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    width: 100%;
    max-width: 100%;
    margin-bottom: 1.25rem;
    padding-bottom: 1.15rem;
    border-bottom: 1px solid #e5e7eb;
    box-sizing: border-box;
    align-items: stretch;
}

.tool-form-constellation .xz-query-wrap .xz-panel-query {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 1rem 1.05rem 1.05rem;
    border: 1px solid #e5eaf0;
    border-radius: 10px;
    background: #fff;
    box-sizing: border-box;
}

.tool-form-constellation .xz-query-wrap .xz-panel-title {
    margin: 0 0 0.85rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid #f0f3f7;
}

.tool-form-constellation .xz-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.65rem;
    margin-bottom: 0.65rem;
    width: 100%;
    max-width: 100%;
}

.tool-form-constellation .xz-row-spacer {
    margin-bottom: 0.65rem;
    /* 对齐左侧「历法 + 日期」两行控件高度：一行标题区后留出近似第二行空间 */
    min-height: 4.65rem;
    align-content: flex-start;
}

.tool-form-constellation .xz-label {
    flex: 0 0 2.75rem;
    width: 2.75rem;
    margin: 0;
    font-size: 0.8125rem;
    color: #6b7280;
    text-align: justify;
    text-align-last: justify;
    line-height: 2rem;
}

.tool-form-constellation .xz-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.45rem;
    min-width: 0;
    flex: 1 1 auto;
}

.tool-form-constellation .xz-controls .radio {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    line-height: 2rem;
    font-size: 0.875rem;
    color: #374151;
}

.tool-form-constellation .xz-year-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.tool-form-constellation .xz-year-wrap.hide {
    display: none;
}

.tool-form-constellation .xz-year-select,
.tool-form-constellation .xz-select,
.tool-form-constellation .xz-select-wide {
    height: 2rem;
    padding: 0.3rem 0.45rem;
    font-size: 0.875rem;
    font-weight: 400;
    color: #555;
    -webkit-text-fill-color: #555;
    border-color: #d9d9d9;
    line-height: 1.4;
    box-sizing: border-box;
}

.tool-form-constellation .xz-year-select {
    width: 7.25rem;
}

.tool-form-constellation .xz-select {
    width: 4.25rem;
}

.tool-form-constellation .xz-month-select,
.tool-form-constellation .xz-day-select {
    min-width: 4.25rem;
    width: auto;
}

.tool-form-constellation .xz-select-wide {
    width: 8.5rem;
    min-width: 8.5rem;
    max-width: 8.5rem;
}

.tool-form-constellation .xz-suffix {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 2rem;
}

.tool-form-constellation .xz-row .btn,
.tool-form-constellation .xz-controls .btn {
    height: 2rem;
    min-width: 4rem;
    padding: 0.3rem 0.65rem;
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.2;
    box-sizing: border-box;
}

.tool-form-constellation .xz-result-slot {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    margin-top: 0.35rem;
    min-height: 9.75rem;
}

.tool-form-constellation .xz-result {
    flex: 1 1 auto;
    margin-top: 0;
    padding: 0.95rem 1rem;
    border-radius: 8px;
    background: linear-gradient(160deg, #f7fafc 0%, #eef4fa 100%);
    border: 1px solid #dbe4f0;
    box-sizing: border-box;
    min-height: 9.75rem;
}

.tool-form-constellation .xz-result.hide {
    display: none;
}

.tool-form-constellation .xz-result-slot:has(.xz-result.hide)::before {
    content: "查询结果将显示在这里";
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-height: 9.75rem;
    padding: 0.95rem 1rem;
    border-radius: 8px;
    border: 1px dashed #d7dee8;
    background: #fafbfc;
    color: #9aa3af;
    font-size: 0.8125rem;
    box-sizing: border-box;
}

.tool-form-constellation .xz-result-name {
    font-size: 1.05rem;
    font-weight: 650;
    color: #1f2937;
    margin-bottom: 0.4rem;
}

.tool-form-constellation .xz-result-meta {
    font-size: 0.8125rem;
    color: #6b7280;
    margin-bottom: 0.55rem;
    line-height: 1.55;
}

.tool-form-constellation .xz-result-personality {
    font-size: 0.8125rem;
    color: #374151;
    line-height: 1.6;
}

.tool-form-constellation .xz-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.tool-form-constellation .xz-card {
    padding: 0.9rem 1rem;
    border: 1px solid #e5eaf0;
    border-radius: 8px;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tool-form-constellation .xz-card:hover {
    border-color: #cfd9e6;
    box-shadow: 0 1px 4px rgba(31, 41, 55, 0.06);
}

.tool-form-constellation .xz-card-name {
    margin: 0 0 0.3rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1f2937;
}

.tool-form-constellation .xz-card-date {
    margin: 0 0 0.5rem;
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.4;
}

.tool-form-constellation .xz-card-personality {
    margin: 0;
    font-size: 0.8125rem;
    color: #4b5563;
    line-height: 1.55;
}

@media (max-width: 900px) {
    .tool-form-constellation .xz-query-wrap {
        grid-template-columns: 1fr;
    }

    .tool-form-constellation .xz-row-spacer {
        min-height: 0;
    }

    .tool-form-constellation .xz-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .tool-form-constellation .xz-query-wrap .xz-panel-query {
        padding: 0.85rem 0.9rem;
    }

    .tool-form-constellation .xz-card-grid {
        grid-template-columns: 1fr;
    }
}
