/* 核心变量与视觉契约 */
:root {
    --bg-main: #faf9f8;
    --bg-pure: #ffffff;
    --primary: #e471b4;
    --primary-light: #fbe6f2;
    --accent: #ff8c82;
    --text-dark: #1a1a1a;
    --text-gray: #4a4a4a;
    --text-muted: #888888;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --radius-pill: 100px;
    --shadow-soft: 0 12px 40px rgba(228, 113, 180, 0.08);
    --shadow-hover: 0 20px 50px rgba(228, 113, 180, 0.15);
    --shadow-border: 0 0 0 1px rgba(0, 0, 0, 0.04);
    --transition: all 0.15s ease;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 基础重置与排版体系 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: var(--font);
    background-color: var(--bg-main);
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* 强制：容器与换行规范 */
.leaf, .topic, .ink {
    word-break: break-word;
    overflow-wrap: break-word;
}
.ink-cn {
    word-break: keep-all;
}

/* 强制导航栏样式复用 */
.crown {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.ribbon {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    min-width: 0;
}
.crest {
    display: flex;
    align-items: center;
    min-width: 0;
}
.crest img {
    height: 32px;
    width: auto;
    display: block;
}
.index {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    min-width: 0;
}
.ribbon-jump {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-gray);
    padding: 8px 0;
    min-width: 0;
}
.ribbon-jump:hover {
    color: var(--primary);
}
.ribbon-jump.active {
    color: var(--primary);
    font-weight: 600;
    position: relative;
}
.ribbon-jump.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
}

@media (max-width: 768px) {
    .index {
        display: none; /* 移动端简化隐藏，保持代码聚焦 */
    }
}

/* 页面骨架与版心 */
.binder {
    padding-top: 80px; /* 留出导航栏空间 */
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.folder {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 24px;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    min-width: 0;
}

/* 视觉组件语法 (首页变体) */
.topic-xl {
    font-weight: 800;
    letter-spacing: -0.02em;
    font-size: clamp(2.5rem, 5vw, 4.2rem);
    line-height: 1.15;
    color: var(--text-dark);
    margin-bottom: 24px;
    white-space: normal;
}
.topic-lg {
    font-weight: 700;
    letter-spacing: -0.01em;
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    line-height: 1.2;
    color: var(--text-dark);
    margin-bottom: 20px;
    white-space: normal;
}
.topic-md {
    font-weight: 600;
    font-size: 1.25rem;
    line-height: 1.4;
    color: var(--text-dark);
    margin-bottom: 12px;
    white-space: normal;
}
.ink-lead {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    color: var(--text-gray);
    margin-bottom: 32px;
    max-width: 700px;
}

.pane {
    background: var(--bg-pure);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-border), var(--shadow-soft);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.pane:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-border), var(--shadow-hover);
}

.stamp-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 36px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: var(--radius-pill);
    box-shadow: 0 8px 20px rgba(228, 113, 180, 0.3);
    border: none;
    cursor: pointer;
    min-width: 0;
}
.stamp-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 25px rgba(228, 113, 180, 0.4);
}

/* 媒体与图标 */
.plate {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    display: block;
}
.glyph {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--primary-light);
    color: var(--primary);
    margin-bottom: 24px;
}

/* -------------------
   特定页面区块布局
   ------------------- */

/* 1. Hero / Intro (基于 split_diagonal 变体) */
.intro {
    background: linear-gradient(180deg, var(--bg-pure) 0%, var(--bg-main) 100%);
    padding-top: 120px;
    padding-bottom: 60px;
    position: relative;
    overflow: hidden;
}
.intro-stack {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    position: relative;
    z-index: 2;
    min-width: 0;
}
.search-pane {
    width: 100%;
    max-width: 680px;
    background: var(--bg-pure);
    border-radius: var(--radius-pill);
    padding: 12px 12px 12px 32px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    box-shadow: var(--shadow-border), var(--shadow-soft);
    margin-bottom: 24px;
    min-width: 0;
}
.search-ink {
    flex: 1 1 0%;
    color: var(--text-muted);
    font-size: 1.1rem;
    text-align: left;
    min-width: 0;
}
.search-stamp {
    padding: 14px 32px;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius-pill);
    font-weight: 600;
}
.tag-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    min-width: 0;
}
.tag-bullet {
    background: rgba(228, 113, 180, 0.08);
    color: var(--primary);
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
    font-weight: 500;
}

/* 2. Gallery / Detail */
.detail {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}
.gallery-leaf {
    width: 100%;
    margin-top: 40px;
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    background: var(--bg-pure);
    padding: 16px;
}
.gallery-leaf .plate {
    border-radius: var(--radius-sm);
}

/* 3. Category / FAQ */
.faq-bg {
    background: var(--bg-pure);
    border-top: 1px solid rgba(0,0,0,0.03);
    border-bottom: 1px solid rgba(0,0,0,0.03);
}
.faq {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    min-width: 0;
}
.grid-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    width: 100%;
    margin-top: 40px;
    min-width: 0;
}
.grid-bullet {
    flex: 1 1 calc(25% - 24px);
    min-width: 240px;
    padding: 32px;
    align-items: flex-start;
}

/* 4. Promo / Comparison */
.comparison-pane {
    width: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #2d1a3a 100%);
    border-radius: var(--radius-lg);
    padding: 64px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 60px;
    color: #fff;
    min-width: 0;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.promo-ink {
    flex: 1 1 400px;
    min-width: 0;
}
.promo-ink .topic-lg {
    color: #fff;
}
.promo-ink .ink-lead {
    color: rgba(255,255,255,0.8);
}
.feature-stack {
    flex: 1 1 300px;
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}
.feature-bullet {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    background: rgba(255,255,255,0.05);
    padding: 20px 24px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,0.1);
    min-width: 0;
}
.feature-bullet svg {
    color: #ffca28;
    flex-shrink: 0;
}

/* Footer */
.base {
    background: var(--bg-pure);
    padding: 60px 24px 40px;
    border-top: 1px solid rgba(0,0,0,0.05);
    text-align: center;
}
.base-topic {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 24px;
}
.base-stack {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    color: var(--text-muted);
    font-size: 0.95rem;
    min-width: 0;
}

/* 响应式断点 */
@media (max-width: 1024px) {
    .grid-bullet {
        flex: 1 1 calc(50% - 24px);
    }
    .comparison-pane {
        padding: 40px;
        gap: 40px;
    }
}
@media (max-width: 768px) {
    .folder {
        padding: 60px 20px;
    }
    .search-pane {
        padding: 8px 8px 8px 20px;
    }
    .search-stamp {
        padding: 10px 20px;
    }
    .grid-bullet {
        flex: 1 1 100%;
    }
    .comparison-pane {
        padding: 32px 24px;
    }
}

.ribbon-crown {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--ink-dark);
}
.ribbon-crown,
.ribbon-crown *,
.ribbon-crown *::before,
.ribbon-crown *::after {
    box-sizing: border-box;
}

.ribbon-crown [role="navigation"],
.ribbon-crown div,
.ribbon-crown section,
.ribbon-crown article,
.ribbon-crown aside,
.ribbon-crown p,
.ribbon-crown h1,
.ribbon-crown h2,
.ribbon-crown h3,
.ribbon-crown h4,
.ribbon-crown h5,
.ribbon-crown h6,
.ribbon-crown a {
    margin: 0;
    padding: 0;
    font: inherit;
    color: inherit;
    letter-spacing: inherit;
    line-height: inherit;
}

.ribbon-crown p,
.ribbon-crown h1,
.ribbon-crown h2,
.ribbon-crown h3,
.ribbon-crown h4,
.ribbon-crown h5,
.ribbon-crown h6 {
    text-decoration: none;
}

.ribbon-crown img {
    display: block;
    max-width: 100%;
    height: auto;
    border: 0;
}

.ribbon-crown {
    box-shadow: none;
    filter: none;
    text-shadow: none;
    background-image: none;
    border-top: none;
    border-left: none;
    border-right: none;
    outline: none;
}

.ribbon-crown a.ribbon-ribbon-jump {
    --aisite-shell-nav-padding: 0;
    --aisite-shell-nav-margin: 0;
    --aisite-shell-nav-line-height: normal;
    --aisite-shell-nav-display: inline;
    --aisite-shell-nav-height: auto;
    --aisite-shell-nav-min-height: auto;
}

.ribbon-crown a.ribbon-ribbon-jump,
.ribbon-crown a.ribbon-ribbon-jump:hover,
.ribbon-crown a.ribbon-ribbon-jump:focus,
.ribbon-crown a.ribbon-ribbon-jump:active,
.ribbon-crown a.ribbon-ribbon-jump.active,
.ribbon-crown a.ribbon-ribbon-jump[aria-current="page"] {
    background: transparent;
    border: none;
    border-bottom: none;
    box-shadow: none;
    outline: none;
    text-decoration: none;
    padding: var(--aisite-shell-nav-padding, 0);
    margin: var(--aisite-shell-nav-margin, 0);
    line-height: var(--aisite-shell-nav-line-height, normal);
    display: var(--aisite-shell-nav-display, inline);
    height: var(--aisite-shell-nav-height, auto);
    min-height: var(--aisite-shell-nav-min-height, auto);
}

.ribbon-crown{
            position: sticky;
            top: 0;
            z-index: 100;
            background: rgba(255, 255, 255, 0.85);
            backdrop-filter: blur(20px);
            border-bottom: 1px solid rgba(0, 0, 0, 0.06);
            padding: 15px 5vw;
        }

.ribbon-crown .ribbon-ribbon{
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: space-between;
            max-width: 1400px;
            margin: 0 auto;
            width: 100%;
        }

.ribbon-crown .ribbon-crest{
            flex: 0 0 auto;
            min-width: 0;
        }

.ribbon-crown .ribbon-crest img{
            height: 32px;
            display: block;
        }

.ribbon-crown .ribbon-index{
            display: flex;
            flex-wrap: wrap;
            gap: 32px;
            align-items: center;
        }

.ribbon-crown .ribbon-ribbon-jump{
            text-decoration: none;
            color: #4a4a4a;
            font-weight: 600;
            font-size: 0.95rem;
            transition: all 0.15s ease;
            position: relative;
        }

.ribbon-crown .ribbon-ribbon-jump:hover, .ribbon-crown .ribbon-ribbon-jump:focus{
            color: #e471b4;
        }

.ribbon-crown .ribbon-ribbon-jump.active{
            color: #e471b4;
        }

.ribbon-crown .ribbon-ribbon-jump.active::after{
            content: '';
            position: absolute;
            bottom: -6px;
            left: 0;
            width: 100%;
            height: 2px;
            background: #e471b4;
            border-radius: 2px;
        }

@media (max-width: 768px){.ribbon-crown .ribbon-index{
                display: none; 
            }}

.ribbon-crown {
    background: rgb(255, 255, 255);
    background-image: none;
}

.endnote-base {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--ink-dark);
}
.endnote-base,
.endnote-base *,
.endnote-base *::before,
.endnote-base *::after {
    box-sizing: border-box;
}

.endnote-base [role="navigation"],
.endnote-base div,
.endnote-base section,
.endnote-base article,
.endnote-base aside,
.endnote-base p,
.endnote-base h1,
.endnote-base h2,
.endnote-base h3,
.endnote-base h4,
.endnote-base h5,
.endnote-base h6,
.endnote-base a {
    margin: 0;
    padding: 0;
    font: inherit;
    color: inherit;
    letter-spacing: inherit;
    line-height: inherit;
}

.endnote-base p,
.endnote-base h1,
.endnote-base h2,
.endnote-base h3,
.endnote-base h4,
.endnote-base h5,
.endnote-base h6 {
    text-decoration: none;
}

.endnote-base img {
    display: block;
    max-width: 100%;
    height: auto;
    border: 0;
}

.endnote-base {
    box-shadow: none;
    filter: none;
    text-shadow: none;
    background-image: none;
    border-top: none;
    border-left: none;
    border-right: none;
    outline: none;
}

.endnote-base a,
.endnote-base a:hover,
.endnote-base a:focus,
.endnote-base a:active {
    background: transparent;
    box-shadow: none;
    outline: none;
    text-decoration: none;
}

.endnote-base .endnote-ink{
            word-break: break-word;
            overflow-wrap: break-word;
        }

.endnote-base p.endnote-ink{
            word-break: keep-all;
        }

.endnote-base{
            background: #ffffff;
            padding: 40px 5vw;
            border-top: 1px solid rgba(0, 0, 0, 0.06);
            text-align: center;
            color: #8c8c8c;
        }

.endnote-base .endnote-base-stack{
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 24px;
            margin-bottom: 20px;
        }

.endnote-base .endnote-base-jump{
            color: #4a4a4a;
            text-decoration: none;
            transition: all 0.15s ease;
        }

.endnote-base .endnote-base-jump:hover, .endnote-base .endnote-base-jump:focus{
            color: #e471b4;
        }