/* 课堂页：十二时辰对照 + 2×2 四象限（知识讲堂 / 老黄历 / 姓氏家园 / 周公解梦） */

.kt-main {
    flex: 1 1 auto;
    width: 100%;
    background: linear-gradient(180deg, #FBF6EA 0%, #F7F4EE 100%);
}

.kt-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 4% 72px;
    box-sizing: border-box;
}

/* 板块锚点导航 */
.kt-toc {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 26px;
    flex-wrap: wrap;
}

.kt-toc a {
    padding: 9px 26px;
    border-radius: 999px;
    background: #fff;
    color: #8B0000;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid #E8DCC8;
    box-shadow: 0 2px 8px rgba(90, 54, 20, 0.05);
}

.kt-toc a:hover {
    background: #8B0000;
    color: #FFF6E0;
    text-decoration: none;
}

/* ---------- 罗盘选墓址 + 十二时辰对照（页面最显眼位置） ---------- */
.kt-shichen {
    background: linear-gradient(135deg, #8B0000 0%, #6E0000 100%);
    border-radius: 14px;
    padding: 24px 28px 20px;
    margin-bottom: 34px;
    box-shadow: 0 10px 30px rgba(139, 0, 0, 0.22);
}

.kt-banner-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 32px;
    align-items: start;
}

.kt-mu {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 4px 0;
}

.kt-compass {
    width: 210px;
    max-width: 100%;
}

.kt-compass svg {
    display: block;
    width: 100%;
    height: auto;
}

.kt-mu-text h2 {
    margin: 0 0 8px;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #FFF6E0;
    text-align: center;
}

.kt-mu-text p {
    margin: 0 0 10px;
    font-size: 13px;
    line-height: 1.9;
    color: rgba(255, 246, 224, 0.85);
}

.kt-mu-text a {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    color: #F3D9A4;
    text-decoration: none;
    border-bottom: 1px solid rgba(243, 217, 164, 0.5);
    padding-bottom: 2px;
    transition: color 0.2s;
}

.kt-mu-text a:hover {
    color: #fff;
    text-decoration: none;
    border-bottom-color: #fff;
}

.kt-shichen-main {
    min-width: 0;
}

.kt-shichen-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.kt-shichen-head h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #FFF6E0;
}

.kt-shichen-lookup {
    display: flex;
    align-items: center;
    gap: 10px;
}

.kt-shichen-lookup label {
    font-size: 14px;
    color: rgba(255, 246, 224, 0.85);
}

.kt-shichen-lookup input {
    padding: 8px 12px;
    border: 1px solid rgba(255, 246, 224, 0.4);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    font-size: 15px;
    color: #3F3A33;
    outline: none;
}

.kt-shichen-lookup button {
    padding: 8px 22px;
    border: none;
    border-radius: 8px;
    background: #C49A3A;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.kt-shichen-lookup button:hover {
    background: #D9B055;
}

.kt-shichen-strip {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.kt-shichen-item {
    background: rgba(255, 246, 224, 0.1);
    border: 1px solid rgba(255, 246, 224, 0.22);
    border-radius: 10px;
    padding: 10px 4px;
    text-align: center;
    transition: background 0.2s, transform 0.2s;
}

.kt-shichen-item .sc-name {
    display: block;
    font-size: 17px;
    font-weight: 800;
    color: #F3D9A4;
    margin-bottom: 4px;
}

.kt-shichen-item .sc-range {
    display: block;
    font-size: 11px;
    color: rgba(255, 246, 224, 0.75);
    white-space: nowrap;
}

.kt-shichen-item.is-hit {
    background: #C49A3A;
    border-color: #C49A3A;
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

.kt-shichen-item.is-hit .sc-name,
.kt-shichen-item.is-hit .sc-range {
    color: #fff;
}

.kt-shichen-tip {
    margin: 14px 0 0;
    text-align: center;
    font-size: 13px;
    color: rgba(255, 246, 224, 0.8);
}

.kt-shichen-tip b {
    color: #F3D9A4;
}

/* ---------- 两列布局：左（知识讲堂+姓氏家园）右（老黄历+周公解梦） ---------- */
.kt-quads {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 26px;
    align-items: start;
}

.kt-col {
    display: flex;
    flex-direction: column;
    gap: 26px;
    min-width: 0;
}

.kt-sec {
    scroll-margin-top: 76px;
}

.kt-quad {
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid #EFE5D2;
    border-radius: 14px;
    padding: 26px 24px 28px;
    box-sizing: border-box;
}

.kt-sec-title {
    margin: 0 0 8px;
    text-align: center;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: #8B0000;
}

.kt-sec-sub {
    margin: 0 0 22px;
    text-align: center;
    font-size: 14px;
    color: #8A8073;
}

.kt-error {
    text-align: center;
    color: #8A8073;
    font-size: 14px;
    padding: 30px 0;
}

.kt-quad-more {
    margin-top: 16px;
    text-align: center;
}

.kt-quad-more a {
    display: inline-block;
    padding: 9px 30px;
    border: 1px solid #8B0000;
    border-radius: 999px;
    color: #8B0000;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.kt-quad-more a:hover {
    background: #8B0000;
    color: #FFF6E0;
    text-decoration: none;
}

/* ---------- 知识讲堂 ---------- */
.kt-article-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.kt-article {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px 22px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(90, 54, 20, 0.06);
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.kt-article:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(139, 0, 0, 0.12);
    text-decoration: none;
}

.kt-article-title {
    font-size: 17px;
    font-weight: 800;
    color: #3F3A33;
}

.kt-article:hover .kt-article-title {
    color: #8B0000;
}

.kt-article-summary {
    font-size: 13px;
    line-height: 1.8;
    color: #8A8073;
}

.kt-article-more {
    font-size: 12px;
    font-weight: 700;
    color: #C49A3A;
}

/* 文章详情 */
.kt-article-detail {
    background: #fff;
    border-radius: 10px;
    padding: 36px 42px;
    box-shadow: 0 4px 16px rgba(90, 54, 20, 0.06);
}

.kt-article-detail h1 {
    margin: 0 0 24px;
    text-align: center;
    font-size: 30px;
    font-weight: 900;
    color: #8B0000;
    letter-spacing: 0.06em;
}

.kt-article-detail h3 {
    margin: 26px 0 10px;
    font-size: 18px;
    font-weight: 800;
    color: #3F3A33;
    padding-left: 12px;
    border-left: 4px solid #C49A3A;
}

.kt-article-detail p {
    margin: 0 0 14px;
    font-size: 15px;
    line-height: 2.1;
    color: #3F3A33;
    text-indent: 2em;
}

/* ---------- 姓氏家园（半栏紧凑模式） ---------- */
.kt-surname-compact {
    max-height: 620px;
    overflow-y: auto;
    padding-right: 6px;
}

.kt-surname-compact .xs-anchors {
    position: sticky;
    top: 0;
    z-index: 5;
    gap: 5px;
    padding: 10px 12px;
    margin-bottom: 14px;
}

.kt-surname-compact .xs-anchors a {
    min-width: 26px;
    height: 26px;
    padding: 0 5px;
    font-size: 12px;
}

.kt-surname-compact .xs-grid {
    grid-template-columns: 1fr;
    gap: 12px;
}

.kt-surname-compact .xs-letter-card {
    padding: 14px 16px 12px;
}

.kt-surname-compact .xs-letter-card h2 {
    font-size: 18px;
    margin-bottom: 8px;
    padding-bottom: 6px;
}

.kt-surname-compact .xs-compound {
    margin-top: 14px;
    padding: 16px 18px;
}

/* ---------- 周公解梦 ---------- */
.kt-dream-search {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.kt-dream-search input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 11px 16px;
    border: 1px solid #E8DCC8;
    border-radius: 999px;
    font-size: 15px;
    outline: none;
    background: #fff;
    color: #3F3A33;
}

.kt-dream-search input:focus {
    border-color: #8B0000;
}

.kt-dream-search button {
    flex: 0 0 auto;
    padding: 11px 28px;
    border: none;
    border-radius: 999px;
    background: #8B0000;
    color: #FFF6E0;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.kt-dream-search button:hover {
    background: #6E0000;
}

.kt-dream-hot {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.kt-dream-hot span {
    font-size: 13px;
    color: #8A8073;
    line-height: 28px;
}

.kt-dream-hot button {
    padding: 4px 14px;
    border: 1px solid #E8DCC8;
    border-radius: 999px;
    background: #fff;
    color: #6B6055;
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.kt-dream-hot button:hover {
    border-color: #8B0000;
    color: #8B0000;
}

.kt-dream-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 480px;
    overflow-y: auto;
}

.kt-dream-item {
    background: #fff;
    border-radius: 10px;
    padding: 14px 18px;
    box-shadow: 0 3px 12px rgba(90, 54, 20, 0.05);
}

.kt-dream-item strong {
    display: block;
    margin-bottom: 6px;
    font-size: 15px;
    color: #8B0000;
}

.kt-dream-item p {
    margin: 0;
    font-size: 13px;
    line-height: 1.9;
    color: #6B6055;
}

.kt-dream-empty {
    text-align: center;
    padding: 26px 0;
    font-size: 14px;
    color: #8A8073;
}

/* ---------- 老黄历 ---------- */
.hl-card {
    width: 100%;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 22px rgba(90, 54, 20, 0.08);
    overflow: hidden;
}

.hl-card-head {
    background: linear-gradient(135deg, #8B0000 0%, #6E0000 100%);
    color: #FFF6E0;
    text-align: center;
    padding: 24px 20px 20px;
    position: relative;
}

.hl-date-solar {
    font-size: 23px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.hl-date-solar span {
    font-size: 15px;
    font-weight: 600;
    margin-left: 8px;
    opacity: 0.85;
}

.hl-date-lunar {
    margin-top: 8px;
    font-size: 19px;
    font-weight: 700;
    color: #F3D9A4;
}

.hl-date-ganzhi {
    margin-top: 6px;
    font-size: 13px;
    opacity: 0.85;
    letter-spacing: 0.1em;
}

.hl-pick-btn {
    margin-top: 14px;
    padding: 8px 26px;
    border: 1px solid rgba(255, 246, 224, 0.6);
    border-radius: 999px;
    background: transparent;
    color: #FFF6E0;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.hl-pick-btn:hover {
    background: rgba(255, 246, 224, 0.15);
}

.hl-yiji {
    padding: 18px 22px;
    border-bottom: 1px dashed #E8DCC8;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hl-yiji-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.hl-badge {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    color: #fff;
}

.hl-badge-yi { background: #1F7A4D; }
.hl-badge-ji { background: #B03A2E; }

.hl-yiji-text {
    font-size: 14px;
    line-height: 32px;
    color: #3F3A33;
}

.hl-grid {
    margin: 0;
    padding: 18px 22px 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.hl-item {
    display: flex;
    gap: 10px;
    font-size: 13px;
    line-height: 1.8;
}

.hl-item dt {
    flex: 0 0 auto;
    color: #8B0000;
    font-weight: 700;
}

.hl-item dt::after {
    content: '：';
}

.hl-item dd {
    margin: 0;
    color: #6B6055;
}

/* 时辰吉凶（在选择日期卡片下面） */
.hl-times {
    width: 100%;
    margin: 22px auto 0;
}

.hl-times-title {
    margin: 0 0 12px;
    text-align: center;
    font-size: 19px;
    font-weight: 800;
    color: #8B0000;
}

.hl-times-table-wrap {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 22px rgba(90, 54, 20, 0.08);
    overflow-x: auto;
}

.hl-times-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    font-size: 12px;
}

.hl-times-table th,
.hl-times-table td {
    padding: 9px 10px;
    text-align: left;
    border-bottom: 1px solid #F0E8D8;
    vertical-align: top;
}

.hl-times-table thead th {
    background: #FBF6EA;
    color: #8B0000;
    font-weight: 800;
    white-space: nowrap;
}

.hl-times-table tbody tr:last-child td {
    border-bottom: none;
}

.hl-t-name {
    font-weight: 700;
    color: #3F3A33;
    white-space: nowrap;
}

.hl-t-range {
    display: block;
    font-weight: 400;
    font-size: 11px;
    color: #8A8073;
    margin-top: 2px;
}

.hl-t-luck {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}

.hl-t-luck.is-ji { background: #1F7A4D; }
.hl-t-luck.is-xiong { background: #B03A2E; }

.hl-t-chong { color: #6B6055; white-space: nowrap; }
.hl-t-yi { color: #3F3A33; }
.hl-t-ji { color: #8A8073; }

.hl-times-more {
    display: block;
    margin: 14px auto 0;
    padding: 9px 34px;
    border: 1px solid #8B0000;
    border-radius: 999px;
    background: #fff;
    color: #8B0000;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.hl-times-more:hover {
    background: #8B0000;
    color: #FFF6E0;
}

/* 日期选择弹窗 */
.hl-picker-mask {
    position: fixed;
    inset: 0;
    background: rgba(40, 20, 10, 0.45);
    z-index: 1000;
}

.hl-picker {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
    width: 360px;
    max-width: calc(100vw - 32px);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(40, 20, 10, 0.35);
    padding: 18px 18px 16px;
    box-sizing: border-box;
}

.hl-picker-title {
    text-align: center;
    font-size: 17px;
    font-weight: 800;
    color: #3F3A33;
    margin-bottom: 12px;
    position: relative;
}

.hl-picker-close {
    position: absolute;
    right: 0;
    top: -4px;
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    font-size: 22px;
    color: #8A8073;
    cursor: pointer;
    line-height: 1;
}

.hl-picker-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 15px;
    font-weight: 700;
    color: #8B0000;
}

.hl-picker-nav button {
    width: 34px;
    height: 34px;
    border: 1px solid #E8DCC8;
    border-radius: 8px;
    background: #FBF6EA;
    color: #8B0000;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
}

.hl-picker-nav button:hover {
    background: #8B0000;
    color: #FFF6E0;
}

.hl-picker-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 12px;
    color: #8A8073;
    padding-bottom: 6px;
}

.hl-picker-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.hl-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5px 0 4px;
    border: none;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    line-height: 1.25;
}

.hl-cell.is-empty {
    background: transparent;
    cursor: default;
    pointer-events: none;
}

.hl-cell:not(.is-empty):hover {
    background: #FBF6EA;
}

.hl-cell-solar {
    font-size: 14px;
    font-weight: 700;
    color: #3F3A33;
}

.hl-cell-lunar {
    font-size: 10px;
    color: #8A8073;
}

.hl-cell.is-today .hl-cell-solar {
    color: #C49A3A;
}

.hl-cell.is-selected {
    background: #8B0000;
}

.hl-cell.is-selected .hl-cell-solar,
.hl-cell.is-selected .hl-cell-lunar {
    color: #FFF6E0;
}

.hl-picker-today {
    display: block;
    margin: 12px auto 0;
    padding: 8px 34px;
    border: 1px solid #8B0000;
    border-radius: 999px;
    background: #fff;
    color: #8B0000;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.hl-picker-today:hover {
    background: #8B0000;
    color: #FFF6E0;
}

@media (max-width: 1000px) {
    .kt-banner-grid { grid-template-columns: 1fr; }
    .kt-quads { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .kt-shichen-strip { grid-template-columns: repeat(4, 1fr); }
    .kt-shichen-head h2 { font-size: 20px; }
    .kt-article-detail { padding: 26px 22px; }
}
