/* ==========================================================================
   CSS Variables & Typography (符合本站契约)
   ========================================================================== */
:root {
    --prime-color: #7a68eb;
    --prime-color-hover: #6552e0;
    --prime-color-light: #f1efff;
    --base-bg: #ffffff;
    --surface-bg: #fbfbfd;
    --text-main: #1d1d1f;
    --text-sub: #86868b;
    --text-inverse: #ffffff;
    --border-color: rgba(0, 0, 0, 0.05);
    
    --radius-lg: 21px;
    --radius-md: 15px;
    --radius-sm: 8px;
    --radius-full: 9999px;
    
    --shadow-float: 0 12px 40px rgba(0, 0, 0, 0.06);
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.04);
    --shadow-press: 0 4px 15px rgba(122, 104, 235, 0.3);
    
    --transition: all 0.15s ease;
    
    --max-width: 1200px;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    background-color: var(--base-bg);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Global Resets & Utility
   ========================================================================== */
* {
    box-sizing: border-box;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Flexbox Enforcement Rules */
.flex-dial,
.prime-shift,
.prime-knob,
.prime-dial,
.lexis-shift,
.lexis-knob,
.keys-dial,
.cloud-shift,
.cloud-knob,
.cand-dial,
.spell-shift,
.spell-knob,
.pinyin-dial,
.char-shift,
.char-knob {
    display: flex;
    flex-wrap: wrap;
}

.flex-dial > *,
.prime-shift > *,
.prime-knob > *,
.prime-dial > *,
.lexis-shift > *,
.lexis-knob > *,
.keys-dial > *,
.cloud-shift > *,
.cloud-knob > *,
.cand-dial > *,
.spell-shift > *,
.spell-knob > *,
.pinyin-dial > *,
.char-shift > *,
.char-knob > * {
    min-width: 0;
}

/* Text Wrapping Enforcement */
.prime-voice,
.prime-typo,
.lexis-voice,
.lexis-typo,
.keys-voice,
.keys-typo,
.cloud-voice,
.cloud-typo,
.cand-voice,
.cand-typo,
.spell-voice,
.spell-typo,
.pinyin-voice,
.pinyin-typo {
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

/* 中文段落体验优化 */
.prime-typo,
.lexis-typo,
.keys-typo,
.cloud-typo,
.cand-typo,
.spell-typo,
.pinyin-typo {
    word-break: keep-all;
    margin: 0 0 16px 0;
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 16px;
    font-weight: 700;
}

/* ==========================================================================
   Header & Navigation (Forced Reuse)
   ========================================================================== */
.ink {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.ink-shift {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 72px;
    align-items: center;
    justify-content: space-between;
}

.stroke {
    display: flex;
    align-items: center;
}

.stroke img {
    height: 28px;
    width: auto;
}

.sign {
    gap: 32px;
    align-items: center;
}

.sign-letter {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-main);
    padding: 8px 0;
    position: relative;
}

.sign-letter:hover {
    color: var(--prime-color);
}

.sign-letter.active {
    color: var(--prime-color);
    font-weight: 600;
}

.sign-letter.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--prime-color);
    border-radius: var(--radius-full);
}

@media (max-width: 768px) {
    .sign {
        display: none; /* 移动端简化，保持原样结构，由外部脚本处理或隐藏 */
    }
}

/* ==========================================================================
   Main Base & Shared Patterns
   ========================================================================== */
.base-board {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.tap-prime {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 36px;
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--radius-full);
    background: var(--prime-color);
    color: var(--text-inverse);
    box-shadow: var(--shadow-press);
    transform: translateY(0);
}

.tap-prime:hover, .tap-prime:focus {
    background: var(--prime-color-hover);
    transform: translateY(-2px);
    color: var(--text-inverse);
}

/* ==========================================================================
   1. Hero Article (Prime)
   ========================================================================== */
.prime-shift {
    background: linear-gradient(180deg, var(--surface-bg) 0%, var(--base-bg) 100%);
    padding: 80px 24px 100px;
    position: relative;
    overflow: hidden;
}

.prime-knob {
    max-width: var(--max-width);
    margin: 0 auto;
    align-items: center;
    gap: 60px;
}

.prime-typo-shift {
    flex: 1 1 500px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.prime-voice {
    font-size: clamp(36px, 5vw, 52px);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--text-main);
    margin-bottom: 24px;
}

.prime-typo {
    font-size: clamp(18px, 2vw, 20px);
    color: var(--text-sub);
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 90%;
}

.prime-dial {
    gap: 16px;
    margin-bottom: 48px;
    align-items: center;
}

.glyph-trait {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: var(--text-main);
    font-weight: 500;
    background: var(--base-bg);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
}

.glyph-trait svg {
    width: 18px;
    height: 18px;
    fill: var(--prime-color);
}

.prime-chord-shift {
    flex: 1 1 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* 抽象视觉焦点 - 细胞词库引擎 */
.dict-pool {
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1;
    position: relative;
    border-radius: var(--radius-full);
    background: radial-gradient(circle at center, var(--prime-color-light) 0%, transparent 70%);
}

.dict-pool::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    background: var(--prime-color);
    border-radius: var(--radius-full);
    transform: translate(-50%, -50%);
    box-shadow: var(--shadow-press), 0 0 0 30px rgba(122, 104, 235, 0.1);
    z-index: 2;
    animation: pulse 3s infinite ease-in-out;
}

.dict-pool svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(0.95); box-shadow: var(--shadow-press), 0 0 0 10px rgba(122, 104, 235, 0.1); }
    50% { transform: translate(-50%, -50%) scale(1); box-shadow: var(--shadow-press), 0 0 0 40px rgba(122, 104, 235, 0.05); }
    100% { transform: translate(-50%, -50%) scale(0.95); box-shadow: var(--shadow-press), 0 0 0 10px rgba(122, 104, 235, 0.1); }
}

/* ==========================================================================
   2. Categories Section (Lexis)
   ========================================================================== */
.lexis-shift {
    padding: 100px 24px;
    background: var(--base-bg);
}

.lexis-knob {
    max-width: var(--max-width);
    margin: 0 auto;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.lexis-voice {
    font-size: clamp(28px, 4vw, 40px);
    letter-spacing: -0.01em;
    margin-bottom: 20px;
    max-width: 800px;
}

.lexis-typo {
    font-size: 18px;
    color: var(--text-sub);
    margin-bottom: 60px;
    max-width: 600px;
}

.keys-dial {
    width: 100%;
    gap: 24px;
    justify-content: center;
}

.keys-trait {
    flex: 1 1 240px;
    background: var(--surface-bg);
    border-radius: var(--radius-lg);
    padding: 40px 30px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    transition: var(--transition);
    transform: translateY(0);
}

.keys-trait:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-float);
    border-color: rgba(122, 104, 235, 0.2);
}

.keys-tone {
    width: 56px;
    height: 56px;
    background: var(--base-bg);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    box-shadow: var(--shadow-soft);
}

.keys-tone svg {
    width: 28px;
    height: 28px;
    fill: var(--prime-color);
}

.keys-voice {
    font-size: 20px;
    margin-bottom: 12px;
}

.keys-typo {
    font-size: 15px;
    color: var(--text-sub);
    margin: 0;
}

/* ==========================================================================
   3. Features Aside (Cloud)
   ========================================================================== */
.cloud-shift {
    padding: 100px 24px;
    background: var(--surface-bg);
}

.cloud-knob {
    max-width: var(--max-width);
    margin: 0 auto;
    align-items: center;
    gap: 60px;
    flex-direction: row-reverse;
}

.cloud-typo-shift {
    flex: 1 1 500px;
    display: flex;
    flex-direction: column;
}

.cloud-voice {
    font-size: clamp(28px, 4vw, 40px);
    letter-spacing: -0.01em;
    margin-bottom: 20px;
}

.cloud-typo {
    font-size: 18px;
    color: var(--text-sub);
    margin-bottom: 40px;
}

.cand-dial {
    flex-direction: column;
    gap: 20px;
}

.cand-trait {
    display: flex;
    align-items: center;
    background: var(--base-bg);
    padding: 24px 30px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.cand-trait:hover {
    box-shadow: var(--shadow-soft);
    border-left: 4px solid var(--prime-color);
}

.cand-voice {
    font-size: 18px;
    margin: 0;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 16px;
}

.cand-voice::before {
    content: '';
    display: block;
    width: 24px;
    height: 24px;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 6L9 17L4 12' stroke='%237a68eb' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.cloud-chord-shift {
    flex: 1 1 400px;
    display: flex;
    justify-content: center;
}

/* 抽象视觉焦点 - 动态热词 */
.cloud-pool {
    width: 100%;
    max-width: 400px;
    height: 400px;
    position: relative;
    background: var(--base-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-float);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cloud-pool::after {
    content: '☁ 热词同步中...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    font-weight: 600;
    color: var(--prime-color);
    letter-spacing: 2px;
}

/* ==========================================================================
   4. Guide Aside (Spell)
   ========================================================================== */
.spell-shift {
    padding: 100px 24px;
    background: var(--base-bg);
}

.spell-knob {
    max-width: 900px;
    margin: 0 auto;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.spell-voice {
    font-size: clamp(28px, 4vw, 40px);
    margin-bottom: 20px;
}

.spell-typo {
    font-size: 18px;
    color: var(--text-sub);
    margin-bottom: 60px;
}

.pinyin-dial {
    width: 100%;
    gap: 30px;
    flex-direction: column;
}

.pinyin-trait {
    display: flex;
    align-items: center;
    text-align: left;
    background: var(--surface-bg);
    padding: 30px 40px;
    border-radius: var(--radius-lg);
    gap: 24px;
    transition: var(--transition);
}

.pinyin-trait:hover {
    box-shadow: var(--shadow-soft);
    background: var(--base-bg);
    border: 1px solid var(--border-color);
}

.pinyin-tone {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    background: var(--prime-color-light);
    color: var(--prime-color);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
}

.pinyin-voice {
    font-size: 20px;
    margin: 0;
    color: var(--text-main);
}

/* ==========================================================================
   Footer (Char)
   ========================================================================== */
.char {
    background: var(--surface-bg);
    border-top: 1px solid var(--border-color);
    padding: 60px 24px 40px;
}

.char-shift {
    max-width: var(--max-width);
    margin: 0 auto;
    flex-direction: column;
    align-items: center;
}

.char-knob {
    width: 100%;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 40px;
}

.char-voice {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 16px;
}

.char-typo {
    color: var(--text-sub);
    font-size: 14px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
    width: 100%;
}

.roots-dial {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.roots-letter {
    color: var(--text-sub);
    font-size: 14px;
}

.roots-letter:hover {
    color: var(--prime-color);
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */
@media (max-width: 1024px) {
    .prime-knob, .cloud-knob {
        flex-direction: column;
        text-align: center;
    }
    
    .prime-typo-shift {
        align-items: center;
    }
    
    .prime-dial {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .prime-shift, .lexis-shift, .cloud-shift, .spell-shift {
        padding: 60px 20px;
    }
    
    .keys-trait {
        flex: 1 1 100%;
    }
    
    .pinyin-trait {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
    }
    
    .char-knob {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .roots-dial {
        justify-content: center;
    }
}

.cand-ink {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    color: var(--typo-main);
}
.cand-ink,
.cand-ink *,
.cand-ink *::before,
.cand-ink *::after {
    box-sizing: border-box;
}

.cand-ink nav,
.cand-ink div,
.cand-ink section,
.cand-ink article,
.cand-ink aside,
.cand-ink p,
.cand-ink h1,
.cand-ink h2,
.cand-ink h3,
.cand-ink h4,
.cand-ink h5,
.cand-ink h6,
.cand-ink a {
    margin: 0;
    padding: 0;
    font: inherit;
    color: inherit;
    letter-spacing: inherit;
    line-height: inherit;
}

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

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

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

.cand-ink a.cand-sign-letter {
    --aisite-shell-nav-padding: 8px 16px;
    --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;
}

.cand-ink a.cand-sign-letter,
.cand-ink a.cand-sign-letter:hover,
.cand-ink a.cand-sign-letter:focus,
.cand-ink a.cand-sign-letter:active,
.cand-ink a.cand-sign-letter.active,
.cand-ink a.cand-sign-letter[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);
}

.cand-ink .cand-flex-dial{
            display: flex;
            flex-wrap: wrap;
        }

.cand-ink .cand-flex-dial > *{
            min-width: 0;
        }

.cand-ink{
            position: sticky;
            top: 0;
            z-index: 100;
            background: rgba(255, 255, 255, 0.9);
            backdrop-filter: blur(12px);
            border-bottom: 1px solid rgba(0,0,0,0.05);
        }

.cand-ink .cand-ink-shift{
            max-width: 1400px;
            margin: 0 auto;
            padding: 16px 24px;
            align-items: center;
            justify-content: space-between;
        }

.cand-ink .cand-stroke{
            width: 140px;
            flex-shrink: 0;
        }

.cand-ink .cand-sign{
            gap: 8px;
            align-items: center;
        }

.cand-ink .cand-sign-letter{
            padding: 8px 16px;
            font-size: 15px;
            font-weight: 500;
            color: #1d1d1f;
            border-radius: 20px;
            transition: background 0.15s ease, color 0.15s ease;
        }

.cand-ink .cand-sign-letter:hover{
            background: rgba(122, 104, 235, 0.1);
            color: #7a68eb;
        }

.cand-ink .cand-sign-letter.active{
            color: #7a68eb;
            font-weight: 600;
        }

@media (max-width: 768px){.cand-ink .cand-sign{
                display: none; 
            }}

.cand-ink {
    background: rgb(255, 255, 255);
    background-image: none;
}

.space-char {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    color: var(--typo-main);
}
.space-char,
.space-char *,
.space-char *::before,
.space-char *::after {
    box-sizing: border-box;
}

.space-char nav,
.space-char div,
.space-char section,
.space-char article,
.space-char aside,
.space-char p,
.space-char h1,
.space-char h2,
.space-char h3,
.space-char h4,
.space-char h5,
.space-char h6,
.space-char a {
    margin: 0;
    padding: 0;
    font: inherit;
    color: inherit;
    letter-spacing: inherit;
    line-height: inherit;
}

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

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

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

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

.space-char{
            background: #f5f5f7;
            padding: 80px 24px 40px;
            color: #86868b;
            font-size: 14px;
        }

.space-char .space-char-shift{
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            flex-direction: column;
            gap: 60px;
        }

.space-char .space-char-knob{
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 40px;
            border-bottom: 1px solid rgba(0,0,0,0.05);
            padding-bottom: 60px;
        }

.space-char .space-char-base{
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

.space-char .space-char-voice{
            color: #1d1d1f;
            font-weight: 600;
            font-size: 16px;
            margin-bottom: 8px;
        }

.space-char .space-char-letter:hover{
            color: #7a68eb;
        }

.space-char .space-char-roots{
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 20px;
        }

.space-char .space-char-brand{
            font-size: 20px;
            font-weight: 700;
            color: #1d1d1f;
            letter-spacing: 1px;
        }