/* ==========================================================================
   Aisitex Visual Family - Core Variables
   ========================================================================== */
:root {
    --bg-main: #fbfafc;
    --bg-alt: #ffffff;
    --bg-deep: #2a1b4d;
    --bg-soft: #f4f0ff;
    --primary: #8b67ef;
    --primary-hover: #7a55d9;
    --text-main: #1d1929;
    --text-sub: #585366;
    --text-inv: #ffffff;
    
    --radius: 16px;
    --radius-lg: 24px;
    --radius-pill: 50px;
    
    --shadow-soft: 0 8px 30px rgba(139, 103, 239, 0.08);
    --shadow-hover: 0 12px 40px rgba(139, 103, 239, 0.15);
    --shadow-btn: 0 8px 20px rgba(139, 103, 239, 0.3);
    
    --transition: all 0.25s ease;
    --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

/* Flexbox Safety Rules */
.board, .set, .deck {
    display: flex;
    flex-wrap: wrap;
}

.board > *, .set > *, .deck > * {
    min-width: 0;
}

/* Text Safety Rules */
.topic, .path {
    word-break: break-word;
    overflow-wrap: break-word;
}

.path {
    white-space: normal;
}

.topic-cn {
    word-break: keep-all;
}

/* ==========================================================================
   Navigation (Strict Copy from Homepage + Active state)
   ========================================================================== */
.apex {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(251, 250, 252, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(139, 103, 239, 0.1);
}

.dicta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
}

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

.pup img {
    height: 32px;
    width: auto;
}

.char {
    display: flex;
    gap: 32px;
}

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

.glyph:hover {
    color: var(--primary);
}

.glyph.active {
    color: var(--primary);
    font-weight: 600;
}

.glyph.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
    border-radius: 3px 3px 0 0;
}

@media (max-width: 768px) {
    .char {
        display: none; /* Simplification for mobile view context */
    }
}

/* ==========================================================================
   Section 1: Hero Intro (Vertical Stack Variant)
   ========================================================================== */
.aura {
    background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg-main) 100%);
    padding: 80px 24px 60px;
    text-align: center;
    overflow: hidden;
}

.aura-shell {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.path-aura {
    line-height: 1.3;
    font-weight: 700;
    font-size: clamp(36px, 5vw, 56px);
    color: var(--text-main);
    letter-spacing: -1px;
    max-width: 800px;
}

.topic-aura {
    font-size: clamp(16px, 2vw, 20px);
    color: var(--text-sub);
    max-width: 640px;
    margin: 0 auto;
}

/* Hero SVG Animation Container */
.aura-rune-shell {
    width: 100%;
    max-width: 800px;
    position: relative;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@keyframes pulse {
    0% { opacity: 0.4; transform: scale(0.95); }
    50% { opacity: 1; transform: scale(1.05); }
    100% { opacity: 0.4; transform: scale(0.95); }
}

.rune-float {
    animation: float 6s ease-in-out infinite;
}
.rune-float-delay {
    animation: float 6s ease-in-out infinite 2s;
}
.rune-pulse {
    animation: pulse 4s ease-in-out infinite;
}

/* ==========================================================================
   Section 2: Gallery Detail (Aside with Grid)
   ========================================================================== */
.spell {
    padding: 80px 24px;
    background: var(--bg-main);
}

.spell-shell {
    max-width: 1200px;
    margin: 0 auto;
}

.deck-spell {
    gap: 48px;
    align-items: center;
}

.spell-narrative {
    flex: 1;
    min-width: 300px;
}

.path-spell {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-main);
}

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

.set-themes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
}

.vocab {
    background: var(--bg-alt);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    border: 1px solid transparent;
    transition: var(--transition);
    cursor: pointer;
}

.vocab:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(139, 103, 239, 0.2);
}

.rune-theme {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    border-radius: 12px;
    background: var(--bg-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.path-theme {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
}

.spell-visual {
    flex: 1.2;
    min-width: 320px;
}

.snap-shell {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-hover);
    position: relative;
}

.snap-shell::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    pointer-events: none;
}

/* ==========================================================================
   Section 3: Feature Capability
   ========================================================================== */
.tray {
    padding: 100px 24px;
    background: var(--bg-alt);
    position: relative;
}

.tray::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(139, 103, 239, 0.1), transparent);
}

.tray-shell {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--bg-main);
    border-radius: var(--radius-lg);
    padding: 64px 48px;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 48px;
}

.tray-topic {
    max-width: 600px;
}

.path-tray {
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 700;
    margin-bottom: 20px;
}

.topic-tray {
    font-size: 18px;
    color: var(--text-sub);
}

.tray-interactive {
    width: 100%;
    max-width: 400px;
    height: 240px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Dynamic Key SVG Animation */
@keyframes press-down {
    0%, 100% { transform: scale(1) translateY(0); box-shadow: 0 16px 32px rgba(139, 103, 239, 0.2); }
    50% { transform: scale(0.95) translateY(4px); box-shadow: 0 4px 12px rgba(139, 103, 239, 0.1); }
}

@keyframes ripple {
    0% { transform: scale(0.8); opacity: 0.8; }
    100% { transform: scale(2.5); opacity: 0; }
}

.keycap-dynamic {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #ffffff, #f4f0ff);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    position: relative;
    z-index: 2;
    animation: press-down 3s ease-in-out infinite;
    border: 1px solid rgba(139, 103, 239, 0.2);
}

.ripple-ring {
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    z-index: 1;
    opacity: 0;
}

.ripple-ring:nth-child(1) {
    animation: ripple 3s ease-out infinite 1.5s;
}
.ripple-ring:nth-child(2) {
    animation: ripple 3s ease-out infinite 1.7s;
}

/* ==========================================================================
   Footer (Consistent with Family)
   ========================================================================== */
.tail {
    background: var(--bg-deep);
    color: rgba(255, 255, 255, 0.7);
    padding: 64px 24px 32px;
    font-size: 14px;
}

.tail-shell {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 40px;
    margin-bottom: 32px;
}

.root-brand {
    flex: 1;
    min-width: 240px;
}

.path-root {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-inv);
    margin-bottom: 16px;
}

.topic-root {
    line-height: 1.8;
}

.space-links {
    display: flex;
    gap: 64px;
    flex-wrap: wrap;
}

.belt-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.path-belt {
    color: var(--text-inv);
    font-weight: 600;
    margin-bottom: 8px;
}

.glyph-tail {
    transition: var(--transition);
}

.glyph-tail:hover {
    color: var(--text-inv);
}

.tail-bottom {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

/* Call to action button style reused */
.tap {
    display: inline-block;
    padding: 16px 40px;
    background: var(--primary);
    color: var(--text-inv);
    font-weight: 600;
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-btn);
    transition: var(--transition);
}

.tap:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(139, 103, 239, 0.4);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tray-shell {
        padding: 40px 24px;
    }
    .space-links {
        gap: 32px;
    }
}

.dicta-apex {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    word-break: break-word;
    color: var(--text-main);
}
.dicta-apex,
.dicta-apex *,
.dicta-apex *::before,
.dicta-apex *::after {
    box-sizing: border-box;
}

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

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

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

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

.dicta-apex a.dicta-glyph {
    --aisite-shell-nav-padding: 8px 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;
}

.dicta-apex a.dicta-glyph,
.dicta-apex a.dicta-glyph:hover,
.dicta-apex a.dicta-glyph:focus,
.dicta-apex a.dicta-glyph:active,
.dicta-apex a.dicta-glyph.active,
.dicta-apex a.dicta-glyph[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);
}

.dicta-apex{
            position: sticky;
            top: 0;
            z-index: 100;
            background: rgba(255, 255, 255, 0.9);
            backdrop-filter: blur(12px);
            border-bottom: 1px solid rgba(139, 103, 239, 0.1);
        }

.dicta-apex .dicta-dicta{
            max-width: 1320px;
            margin: 0 auto;
            padding: 16px 24px;
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
            align-items: center;
        }

.dicta-apex .dicta-dicta > *{ min-width: 0; }

.dicta-apex .dicta-pup{
            display: flex;
            align-items: center;
        }

.dicta-apex .dicta-pup img{
            height: 32px;
            width: auto;
            display: block;
        }

.dicta-apex .dicta-char{
            display: flex;
            flex-wrap: wrap;
            gap: 32px;
            align-items: center;
        }

.dicta-apex .dicta-char > *{ min-width: 0; }

.dicta-apex .dicta-glyph{
            font-size: 15px;
            font-weight: 500;
            color: #585366;
            position: relative;
            padding: 8px 0;
        }

.dicta-apex .dicta-glyph:hover, .dicta-apex .dicta-glyph.active{
            color: #8b67ef;
        }

.dicta-apex .dicta-glyph.active::after{
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 2px;
            background: #8b67ef;
            border-radius: 2px;
        }

@media (max-width: 768px){.dicta-apex .dicta-char{
                display: none; 
            }}

.dicta-apex {
    background: rgb(255, 255, 255);
    background-image: none;
}

.space-tail {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    word-break: break-word;
    color: var(--text-main);
}
.space-tail,
.space-tail *,
.space-tail *::before,
.space-tail *::after {
    box-sizing: border-box;
}

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

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

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

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

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

.space-tail .space-glyph{
            font-size: 15px;
            font-weight: 500;
            color: #585366;
            position: relative;
            padding: 8px 0;
        }

.space-tail .space-glyph:hover, .space-tail .space-glyph.active{
            color: #8b67ef;
        }

.space-tail .space-glyph.active::after{
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 2px;
            background: #8b67ef;
            border-radius: 2px;
        }

.space-tail{
            background: #ffffff;
            border-top: 1px solid rgba(0,0,0,0.05);
            padding: 60px 24px 40px;
            margin-top: 80px;
        }

.space-tail .space-space{
            max-width: 1320px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: 2fr 1fr 1fr 1fr;
            gap: 60px;
            margin-bottom: 60px;
        }

.space-tail .space-tail-brand{
            font-size: 24px;
            font-weight: 700;
            color: #1d1929;
            margin-bottom: 16px;
        }

.space-tail .space-tail-desc{
            color: #585366;
            max-width: 300px;
        }

.space-tail .space-path-tail{
            font-size: 16px;
            font-weight: 600;
            margin-bottom: 24px;
        }

.space-tail .space-belt{
            list-style: none;
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

.space-tail .space-belt .space-glyph{
            padding: 0;
            color: #585366;
        }

.space-tail .space-root{
            max-width: 1320px;
            margin: 0 auto;
            padding-top: 32px;
            border-top: 1px solid rgba(0,0,0,0.05);
            text-align: center;
            color: #585366;
            font-size: 14px;
        }

@media (max-width: 1024px){.space-tail .space-space{
                grid-template-columns: 1fr 1fr;
            }}

@media (max-width: 768px){.space-tail .space-space{
                grid-template-columns: 1fr;
                gap: 40px;
            }}