/**
 * 每日黄历 / 老黄历查询 —— 样式（20261102b 重设计）
 * 主题：暖纸金韵——米金渐变头卡、朱红印章式宜忌、金色黄道高亮。
 */
:root {
    --hl-line: #eee7d8;
    --hl-soft: #faf7f0;
    --hl-ink: #33302a;
    --hl-sub: #7d7668;
    --hl-red: #b83a2e;
    --hl-red-bg: #fcf0ee;
    --hl-green: #2c7a4e;
    --hl-green-bg: #edf7f0;
    --hl-gold: #a07414;
    --hl-gold-deep: #8a6410;
    --hl-gold-bg: linear-gradient(135deg, #fdf6e0, #f9ecc8);
    --hl-head-bg: linear-gradient(150deg, #fffdf6 0%, #fbf3de 78%, #f7ebc9 100%);
}

/* ================= 日期导航 ================= */
#app .hl-form {
    margin-bottom: 14px;
}

.hl-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.hl-date {
    max-width: 180px;
    text-align: center;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 14px;
    border: 1px solid var(--hl-line);
    border-radius: 9px;
    background: #fff;
    color: #5d5749;
    font-size: 13.5px;
    cursor: pointer;
    transition: border-color .15s, color .15s, box-shadow .15s;
}

.btn-ghost:hover {
    border-color: var(--hl-gold);
    color: var(--hl-gold);
    box-shadow: 0 1px 6px rgba(160, 116, 20, .12);
}

.btn-ghost.sm {
    padding: 4px 10px;
    font-size: 12.5px;
}

.btn-primary {
    background: linear-gradient(135deg, #b98a1e, #96700f);
    border: 0;
    border-radius: 9px;
    color: #fff;
    padding: 9px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(150, 112, 15, .28);
    transition: transform .12s, box-shadow .15s;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(150, 112, 15, .34);
}

.hl-hint {
    margin-top: 10px;
    font-size: 12.5px;
    color: var(--hl-sub);
    line-height: 1.7;
}

#app .card .card-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 700;
    color: var(--hl-ink);
    margin-bottom: 12px;
}

/* ================= 头卡 ================= */
.hl-head {
    background: var(--hl-head-bg);
    border: 1px solid #efe2c2;
    box-shadow: 0 2px 14px rgba(154, 116, 24, .08);
    position: relative;
    overflow: hidden;
}

.hl-head::after {
    content: '黄曆';
    position: absolute;
    right: 86px;
    top: -14px;
    font-size: 84px;
    font-weight: 800;
    color: rgba(160, 116, 20, .05);
    letter-spacing: 6px;
    pointer-events: none;
    line-height: 1;
}

.hl-head-top {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.hl-head-main {
    min-width: 0;
}

.hl-solar {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.hl-solar b {
    font-size: 36px;
    font-weight: 800;
    color: var(--hl-ink);
    letter-spacing: 1px;
    font-family: Georgia, 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
}

.hl-solar span {
    font-size: 14px;
    color: var(--hl-sub);
}

.hl-lunar {
    margin-top: 5px;
    font-size: 16px;
    color: var(--hl-ink);
    font-weight: 700;
    letter-spacing: .5px;
}

.hl-gz {
    margin-top: 7px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #6d6552;
    background: rgba(255, 255, 255, .72);
    border: 1px solid #eee0bd;
    border-radius: 999px;
    padding: 4px 13px;
    letter-spacing: 1px;
}

.hl-head-side {
    text-align: center;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.hl-sx-badge {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--hl-gold-bg);
    border: 1px solid #e8d5a0;
    box-shadow: 0 2px 8px rgba(154, 116, 24, .16);
    display: flex;
    align-items: baseline;
    justify-content: center;
    padding-top: 7px;
}

.hl-sx-badge span {
    font-size: 28px;
    font-weight: 800;
    color: var(--hl-gold-deep);
    line-height: 1.2;
}

.hl-sx-badge em {
    font-style: normal;
    font-size: 11px;
    color: #a8925c;
    margin-left: 1px;
}

.hl-dd {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    background: #f1ede2;
    color: #8d8574;
    border: 1px solid #e4ddc9;
}

.hl-dd.on {
    background: var(--hl-gold-bg);
    color: var(--hl-gold-deep);
    border-color: #e2ce96;
    box-shadow: 0 1px 6px rgba(160, 116, 20, .14);
}

.hl-dd.sm {
    margin-top: 0;
    padding: 1px 9px;
    font-size: 11.5px;
}

/* 标签（在头卡内底部） */
.hl-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 13px;
    padding-top: 11px;
    border-top: 1px dashed #e8dcbb;
    position: relative;
    z-index: 1;
}

.hl-tag {
    font-style: normal;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .8);
    border: 1px solid #eee3c6;
    color: #7d7260;
}

.hl-tag.f {
    background: var(--hl-red-bg);
    border-color: #f0d3cd;
    color: var(--hl-red);
    font-weight: 600;
}

.hl-tag.j {
    background: rgba(255, 255, 255, .66);
    border-color: #e4dbc2;
    color: var(--hl-gold);
    font-weight: 600;
}

/* ================= 宜忌 ================= */
.hl-yiji {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.hl-yiji > div {
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    min-height: 86px;
}

.hl-yiji .hl-yi {
    background: var(--hl-green-bg);
    border: 1px solid #d3ead9;
}

.hl-yiji .hl-jj {
    background: var(--hl-red-bg);
    border: 1px solid #efd4ce;
}

.hl-yiji-t {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
    font-weight: 800;
    color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .14);
}

.hl-yiji-t.yi {
    background: linear-gradient(145deg, #35905d, #24693f);
}

.hl-yiji-t.ji {
    background: linear-gradient(145deg, #c94a3c, #a02c21);
}

.hl-yiji .hl-chips {
    padding-top: 3px;
}

.hl-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.hl-chip {
    font-style: normal;
    font-size: 13px;
    padding: 4px 12px;
    border-radius: 7px;
    background: #fff;
    color: #4d473c;
    border: 1px solid #e7e1d2;
}

.hl-yi .hl-chip {
    background: #fff;
    color: var(--hl-green);
    border-color: #cfe7d8;
    font-weight: 600;
}

.hl-jj .hl-chip {
    background: #fff;
    color: var(--hl-red);
    border-color: #eccfca;
    font-weight: 600;
}

.hl-chips.sm .hl-chip {
    font-size: 12px;
    padding: 2px 9px;
}

.hl-none {
    font-size: 13px;
    color: #a39c8b;
}

.hl-none.big {
    display: block;
    padding: 14px;
    background: var(--hl-soft);
    border-radius: 9px;
    line-height: 1.8;
    color: #6d6552;
}

/* ================= 吉神方位 ================= */
.hl-pos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.hl-pos-item {
    background: linear-gradient(160deg, #fffdf8, #faf4e4);
    border: 1px solid #eddfba;
    border-radius: 12px;
    padding: 15px 10px 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2px;
    box-shadow: inset 0 1px 0 #fff;
}

.hl-pos-l {
    font-size: 12.5px;
    color: var(--hl-gold);
    font-weight: 700;
    letter-spacing: 2px;
}

.hl-pos-item b {
    font-size: 21px;
    color: var(--hl-ink);
    letter-spacing: 1px;
}

.hl-pos-item .hl-muted {
    font-size: 12px;
    color: #a89e88;
}

/* ================= 冲煞与神煞 ================= */
.hl-grid2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}

.hl-cell {
    background: #fff;
    border: 1px solid var(--hl-line);
    border-radius: 10px;
    padding: 10px 13px;
    font-size: 13.5px;
    color: var(--hl-ink);
    line-height: 1.75;
}

.hl-cell.wl {
    display: block;
    margin-bottom: 10px;
}

.hl-cell-l {
    display: inline-block;
    min-width: 68px;
    font-size: 12.5px;
    color: #a89e88;
    margin-right: 6px;
    vertical-align: top;
}

.hl-cell.wl span:last-child {
    display: inline;
    color: var(--hl-ink);
}

.hl-ss {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.hl-ss-row {
    display: flex;
    align-items: flex-start;
    gap: 4px;
}

.hl-ss-row .hl-cell-l {
    min-width: 68px;
    padding-top: 4px;
    flex: 0 0 auto;
}

.yi-l {
    color: var(--hl-green);
    font-weight: 600;
}

.ji-l {
    color: var(--hl-red);
    font-weight: 600;
}

.hl-td-yi .yi-l,
.hl-td-ji .ji-l {
    display: inline-block;
    margin-right: 6px;
}

/* ================= 时辰表 ================= */
.hl-tablewrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--hl-line);
    border-radius: 10px;
}

.hl-times {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.hl-times th {
    background: var(--hl-soft);
    font-size: 12.5px;
    font-weight: 700;
    color: #8d8574;
    padding: 9px 8px;
    text-align: left;
    border-bottom: 1px solid var(--hl-line);
    white-space: nowrap;
}

.hl-times td {
    padding: 9px 8px;
    border-bottom: 1px solid #f3efe4;
    color: #4d473c;
    vertical-align: top;
}

.hl-times tr:last-child td {
    border-bottom: 0;
}

.hl-times tr.j td {
    background: #fffdf4;
}

.hl-times tr.j td:first-child {
    box-shadow: inset 3px 0 0 #d9b95c;
}

.hl-tz {
    white-space: nowrap;
    color: #8d8574;
    font-size: 12.5px;
}

.hl-tz b {
    font-size: 14.5px;
    color: var(--hl-ink);
}

.hl-tt {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.hl-tc {
    white-space: nowrap;
}

.hl-tyi details {
    font-size: 12.5px;
}

.hl-tyi summary {
    cursor: pointer;
    color: var(--hl-gold);
    user-select: none;
}

.hl-td-yi,
.hl-td-ji {
    margin-top: 6px;
    line-height: 1.7;
    min-width: 200px;
}

/* ================= 择吉 ================= */
.hl-zhai-form {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 10px;
    align-items: end;
    margin-bottom: 14px;
}

#app .hl-zhai-form .field label {
    display: block;
    font-size: 12.5px;
    color: var(--hl-sub);
    margin-bottom: 4px;
}

#app .hl-zhai-form .text-input {
    width: 100%;
}

.hl-btn {
    height: 38px;
}

.hl-zhai-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.hl-zhai-item {
    border: 1px solid var(--hl-line);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #fffdf8;
    transition: transform .12s, box-shadow .15s, border-color .15s;
}

.hl-zhai-item:hover {
    transform: translateY(-2px);
    border-color: #e2ce96;
    box-shadow: 0 4px 14px rgba(154, 116, 24, .13);
}

.hl-zhai-d {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.hl-zhai-d b {
    font-size: 16px;
    color: var(--hl-ink);
    font-family: Georgia, 'Noto Serif SC', 'Songti SC', serif;
}

.hl-zhai-d span {
    font-size: 12.5px;
    color: #6d6552;
}

.hl-zhai-gz {
    font-size: 13px;
    color: var(--hl-ink);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.hl-zhai-yi {
    font-size: 12.5px;
    color: #6d6552;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ================= 相关工具 ================= */
.hl-rel-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.hl-rel-item {
    min-width: 0;
    max-width: 100%;
    display: flex;
    align-items: center;
    gap: 11px;
    border: 1px solid var(--hl-line);
    border-radius: 12px;
    padding: 12px 14px;
    text-decoration: none;
    background: #fffdf8;
    transition: transform .12s, box-shadow .15s, border-color .15s;
}

.hl-rel-item:hover {
    transform: translateY(-2px);
    border-color: #e2ce96;
    box-shadow: 0 4px 14px rgba(154, 116, 24, .13);
}

.hl-rel-ico {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 11px;
    background: var(--hl-gold-bg);
    border: 1px solid #ecd9a8;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hl-gold-deep);
}

.hl-rel-t {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hl-rel-t b {
    font-size: 14px;
    color: var(--hl-ink);
}

.hl-rel-t i {
    font-style: normal;
    font-size: 12px;
    color: #a39c8b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hl-rel-go {
    margin-left: auto;
    color: #c8bfa8;
    display: flex;
}

/* ================= 说明 ================= */
.hl-note p {
    font-size: 13px;
    color: #6d6552;
    line-height: 1.9;
    margin: 0 0 8px;
}

.hl-note p:last-child {
    margin-bottom: 0;
}

/* ================= 移动端 ================= */
@media (max-width: 768px) {
    .hl-head-top {
        flex-direction: row;
        align-items: flex-start;
        gap: 12px;
    }

    .hl-head-side {
        flex-direction: row;
        align-items: center;
        gap: 10px;
        padding-top: 4px;
    }

    .hl-sx-badge {
        width: 46px;
        height: 46px;
        padding-top: 4px;
    }

    .hl-sx-badge span {
        font-size: 22px;
    }

    .hl-solar b {
        font-size: 28px;
    }

    .hl-head::after {
        font-size: 60px;
        right: 12px;
    }

    .hl-yiji {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .hl-pos {
        grid-template-columns: repeat(3, 1fr);
        gap: 7px;
    }

    .hl-pos-item {
        padding: 11px 4px 9px;
    }

    .hl-pos-item b {
        font-size: 15px;
    }

    .hl-pos-l {
        letter-spacing: 1px;
    }

    .hl-grid2 {
        grid-template-columns: 1fr;
    }

    .hl-zhai-form {
        grid-template-columns: 1fr;
    }

    .hl-btn {
        width: 100%;
    }

    .hl-zhai-list {
        grid-template-columns: 1fr;
    }

    .hl-rel-grid {
        grid-template-columns: 1fr;
    }

    .hl-nav .hl-today {
        margin-left: auto;
    }
}

@media (max-width: 400px) {
    .hl-pos {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hl-pos-l {
        font-size: 11.5px;
    }

    .hl-pos-item b {
        font-size: 13.5px;
    }
}
