/**
 * 两不相伤 · 首页品牌区 + 三十三篇目录（配套 lbxs-home-brand.php）
 * 水墨灰蓝，与登录页同源（取色 --zz-*）
 * v2.0.0
 */

/* ============ 旧版块隐藏（内容不动，只藏视图） ============ */
/* 旧的三组按钮 + 三个章节标题，由新的三十三篇目录接管 */
.entry-content > h2.wp-block-heading,
.entry-content > .wp-block-buttons { display: none !important; }

/* ============ 品牌区（瘦身：无卡片，居中） ============ */

.lbxs-brand {
    --ink:        #1b1f23;
    --ink-soft:   #3d454d;
    --ink-faint:  #6b7783;
    --blue:       #6d8090;
    --blue-soft:  #93a5b1;
    --line:       rgba(27, 31, 35, .14);

    max-width: 920px;
    margin: 6px auto 26px;
    padding: 0 16px;
    text-align: center;
    color: var(--ink);
    font-family: "Songti SC", "SimSun", "Noto Serif CJK SC", "Source Han Serif SC", "STSong", serif;
    -webkit-font-smoothing: antialiased;
}

.lbxs-brand__title {
    margin: 0 0 14px;
    font-size: 25px;
    line-height: 1.5;
    font-weight: 700;
    letter-spacing: .06em;
    color: var(--ink);
}

.lbxs-brand__title::after {
    content: "";
    display: block;
    width: 46px;
    height: 1px;
    margin: 12px auto 0;
    background: var(--blue-soft);
}

.lbxs-brand__lead {
    margin: 0 auto 8px;
    max-width: 780px;
    font-size: 15px;
    line-height: 1.95;
    color: var(--ink-soft);
    text-align: center;
}

.lbxs-brand__note {
    margin: 0 auto;
    max-width: 780px;
    font-size: 13px;
    line-height: 1.9;
    color: var(--ink-faint);
}

/* ============ 三十三篇目录 ============ */

.lbxs-toc {
    --ink:        #1b1f23;
    --ink-soft:   #3d454d;
    --ink-faint:  #6b7783;
    --blue:       #6d8090;
    --blue-soft:  #93a5b1;
    --paper:      #f6f4f0;
    --line:       rgba(27, 31, 35, .14);

    max-width: 1040px;
    margin: 0 auto 34px;
    padding: 22px 26px 24px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 3px;
    font-family: "Songti SC", "SimSun", "Noto Serif CJK SC", "Source Han Serif SC", "STSong", serif;
}

.lbxs-toc__group { margin-bottom: 18px; }
.lbxs-toc__group:last-child { margin-bottom: 0; }

.lbxs-toc__label {
    display: inline-flex;
    align-items: baseline;
    gap: 7px;
    margin-bottom: 10px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .22em;
    color: var(--ink);
}

.lbxs-toc__label i {
    font-style: normal;
    font-size: 11px;
    letter-spacing: 0;
    color: var(--blue-soft);
}

.lbxs-toc__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 9px;
}

.lbxs-toc__grid--classics { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }

/* 篇目按钮：胶囊、宣纸白底，悬浮浮出篇旨 */
.lbxs-chip {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 8px;
    background: rgba(255, 255, 255, .92);
    border: 1px solid var(--line);
    border-radius: 999px;
    text-decoration: none;
    color: var(--ink);
    font-size: 14.5px;
    letter-spacing: .08em;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.lbxs-chip:hover,
.lbxs-chip:focus-visible {
    transform: translateY(-2px);
    border-color: var(--blue);
    box-shadow: 0 6px 16px rgba(27, 31, 35, .12);
    outline: none;
}

/* 悬浮篇旨 */
.lbxs-chip__tip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 9px);
    transform: translate(-50%, 4px);
    min-width: 200px;
    max-width: 260px;
    width: max-content;
    padding: 8px 14px;
    background: #2b3440;
    color: #f6f4f0;
    font-size: 12.5px;
    line-height: 1.7;
    letter-spacing: .04em;
    white-space: normal;
    text-align: center;
    border-radius: 4px;
    box-shadow: 0 8px 20px rgba(27, 31, 35, .22);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
    z-index: 30;
}

.lbxs-chip__tip::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #2b3440;
}

.lbxs-chip:hover .lbxs-chip__tip,
.lbxs-chip:focus-visible .lbxs-chip__tip {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

/* 经典入口：虚线描边区分 */
.lbxs-chip--classic {
    background: transparent;
    border-style: dashed;
    color: var(--ink-soft);
}

.lbxs-chip--classic:hover,
.lbxs-chip--classic:focus-visible {
    border-style: solid;
    color: var(--ink);
}

/* ============ 封面区（沿用 v1.0.4/v1.0.5） ============ */

.entry-content > .wp-block-cover { min-height: 320px !important; }

.wp-block-cover .wp-block-cover__background {
    background-color: transparent !important;
    background-image: linear-gradient(180deg,
        rgba(246, 244, 240, .30) 0%,
        rgba(246, 244, 240, 0) 38%,
        rgba(246, 244, 240, .66) 100%) !important;
}

.lbxs-cover-tagline {
    font-family: "Songti SC", "SimSun", "Noto Serif CJK SC", "STSong", serif;
    font-size: 27px !important;
    font-weight: 700;
    letter-spacing: .14em;
    color: #1b1f23;
    margin: 0 0 22px !important;
    text-shadow: 0 1px 0 rgba(255, 255, 255, .85);
}

.wp-block-cover .wp-block-search__inside-wrapper {
    width: 540px !important;
    max-width: 90% !important;
    background: rgba(255, 255, 255, .95);
    border: 1px solid rgba(27, 31, 35, .16) !important;
    border-radius: 999px;
    padding: 4px !important;
    box-shadow: 0 10px 26px rgba(27, 31, 35, .12);
}

.wp-block-cover .wp-block-search__input {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    min-height: 0 !important;
    height: 44px;
    padding: 0 10px 0 20px !important;
    font-family: "Songti SC", "SimSun", "Noto Serif CJK SC", serif;
    font-size: 15px;
    color: #1b1f23;
}

.wp-block-cover .wp-block-search__input::placeholder {
    color: #93a5b1;
    letter-spacing: .04em;
}

.wp-block-cover .wp-block-search__button {
    background: #2b3440 !important;
    color: #f6f4f0 !important;
    border: 0 !important;
    border-radius: 999px !important;
    min-height: 0 !important;
    height: 44px;
    padding: 0 24px !important;
    font-size: 14px !important;
    letter-spacing: .12em;
    margin-left: 6px !important;
    transition: background .2s ease;
}

.wp-block-cover .wp-block-search__button:hover,
.wp-block-cover .wp-block-search__button:focus-visible {
    background: #1b1f23 !important;
}

/* ============ 移动端 ============ */
@media (max-width: 600px) {
    .lbxs-brand { padding: 0 10px; margin-bottom: 20px; }
    .lbxs-brand__title { font-size: 20px; }
    .lbxs-brand__lead  { font-size: 14px; line-height: 1.9; }
    .lbxs-brand__note  { font-size: 12px; }

    .lbxs-toc { margin: 0 12px 26px; padding: 16px 14px 18px; }
    .lbxs-toc__grid { grid-template-columns: repeat(3, 1fr); gap: 7px; }
    .lbxs-toc__grid--classics { grid-template-columns: repeat(3, 1fr); }
    .lbxs-chip { height: 36px; font-size: 13.5px; }
    .lbxs-chip__tip { display: none; } /* 触屏无悬浮，直接点进篇页 */

    .entry-content > .wp-block-cover { min-height: 230px !important; }
    .lbxs-cover-tagline { font-size: 20px !important; letter-spacing: .1em; margin-bottom: 16px !important; }
    .wp-block-cover .wp-block-search__input  { font-size: 14px; padding-left: 16px !important; }
    .wp-block-cover .wp-block-search__button { padding: 0 16px !important; letter-spacing: .06em; }
}

/* 降低动效偏好 */
@media (prefers-reduced-motion: reduce) {
    .lbxs-chip,
    .lbxs-chip__tip,
    .wp-block-cover .wp-block-search__button { transition: none !important; }
}
