        :root {
            --obsidian: #0D0D0D;
            --vanguard: #D4AF37;
            --vanguard-glow: rgba(212, 175, 55, 0.4);
            --ghost: #F8F8F8;
            --glass-bg: rgba(255, 255, 255, 0.03);
            --glass-border: rgba(212, 175, 55, 0.3);
        }

        html, body {
            margin: 0;
            padding: 0;
            background-color: var(--obsidian);
            color: var(--ghost);
            font-family: 'Sarabun', sans-serif;
            font-size: 16px; 
            line-height: 1.6;
            height: 100vh;
            overflow-x: hidden;
            overflow-y: auto;
        }
        
        @media (min-width: 768px) {
            body, html { font-size: 18px; }
        }

        .safe-zone-content {
            width: 100%;
            display: flex;
            flex-direction: column;
            justify-content: center;
            overflow-y: auto;
            position: relative;
        }

        .safe-zone-content::-webkit-scrollbar { width: 4px; }
        .safe-zone-content::-webkit-scrollbar-track { background: transparent; }
        .safe-zone-content::-webkit-scrollbar-thumb { background: rgba(212, 175, 55, 0.5); border-radius: 4px; }

        h1, h2, h3, h4, h5, h6 { font-family: 'Cinzel', serif; }
        .thai-header { font-family: 'Kanit', sans-serif; font-weight: 500; }

        .scroll-container {
            height: 100vh;
            overflow-y: auto;
            scroll-snap-type: y mandatory;
            scroll-behavior: smooth;
        }
        
        @media (max-width: 1023px) {
            .scroll-container {
                scroll-snap-type: none;
                height: auto;
                overflow-y: visible;
            }
        }

        .scroll-container::-webkit-scrollbar {
            display: none;
        }

/* 1. Container Structure */
.snap-section {
    scroll-snap-align: start;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 5% 140px !important; /* ดันเนื้อหาขึ้นพ้น Dock 140px */
}

/* ============================================================ */
/* MOBILE UI: VERTICAL SKILLS & ADAPTIVE FLOW                   */
/* ============================================================ */

@media (max-width: 1023px) {
    /* 1. คืนค่า Hero & ทั่วไปกลับมา แต่เปลี่ยน 140px เป็น 120px */
    .snap-section {
        padding-bottom: 120px !important;
        scroll-snap-align: none;
    }

    /* 2. ล็อกเป้าเฉพาะหน้า Agent (หน้าที่มี .bg-black/90) ให้โฟลว์ต่อเนื่อง */
    .snap-section:has(.bg-black\/90) {
        padding-top: 60px !important; 
        padding-bottom: 120px !important; 
        align-items: flex-start !important; 
    }

    /* 4. จัดเรียงสกิลเป็นแนวตั้ง (Vertical Layout) */
    .tech-list li {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 4px !important;
        margin-bottom: 1.5rem !important;
        width: 100% !important;
    }

    /* บังคับตัดคำไม่ให้ล้นกล่อง */
    .tech-list li strong {
        display: block !important;
        width: 100% !important;
        white-space: normal !important; 
        word-wrap: break-word !important;
        color: var(--vanguard) !important;
    }

    .tech-list li span, .tech-list li br + span {
        width: 100% !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    /* 5. กรอบ Special Skill Layer 2 */
    .specs-content.expanded {
        margin-top: 1rem !important;
        padding: 1rem !important;
        border: 1px solid rgba(212, 175, 55, 0.3) !important;
        border-left: 4px solid var(--vanguard) !important;
        background: rgba(212, 175, 55, 0.05) !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}

        /* 2. Character Positioning */

        .hero-img-glow {
            position: absolute;
            top: 50%; right: 5%;
            transform: translateY(-50%);
            width: 80vh; height: 80vh;
            background: radial-gradient(circle, rgba(212, 175, 55, 0.25) 0%, transparent 60%);
            z-index: 0;
            filter: blur(40px);
            animation: pulse-glow 4s infinite alternate;
        }

        @media (max-width: 1023px) {
            .hero-img-glow {
                right: 50%;
                transform: translate(50%, -50%);
            }
        }
        
        .animate-on-scroll {
            opacity: 0;
            transform: translateY(30px);
            transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            will-change: opacity, transform;
        }

        .animate-on-scroll.visible {
            opacity: 1;
            transform: translateY(0);
        }

        @keyframes pulse-glow {
            0% { opacity: 0.5; transform: translateY(-50%) scale(0.95); }
            100% { opacity: 1; transform: translateY(-50%) scale(1.05); }
        }

        @keyframes gold-pulse-row {
            0% { background-color: rgba(212, 175, 55, 0.05); box-shadow: 0 0 10px rgba(212, 175, 55, 0.2); outline: 2px solid rgba(212, 175, 55, 0.3); outline-offset: -2px; }
            50% { background-color: rgba(212, 175, 55, 0.25); box-shadow: 0 0 30px rgba(212, 175, 55, 0.6); outline: 2px solid rgba(212, 175, 55, 1); outline-offset: -2px; }
            100% { background-color: rgba(212, 175, 55, 0.05); box-shadow: 0 0 10px rgba(212, 175, 55, 0.2); outline: 2px solid rgba(212, 175, 55, 0.3); outline-offset: -2px; }
        }

        .gold-pulse-border {
            animation: gold-pulse-row 2s infinite ease-in-out;
            position: relative;
            z-index: 10;
        }

        /* 3. The Floating Text Bar */

        .gold-glow { text-shadow: 0 0 20px var(--vanguard-glow); }
        .gold-text { color: var(--vanguard); }

        .scroll-indicator {
            position: absolute;
            bottom: 2rem;
            left: 50%;
            transform: translateX(-50%);
            color: rgba(212, 175, 55, 0.6);
            animation: bounce 2s infinite;
            z-index: 50;
            text-align: center;
            font-family: 'Kanit', sans-serif;
            font-size: 1.2rem;
            letter-spacing: 0.1em;
            pointer-events: none;
        }

        @keyframes bounce {
            0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
            40% { transform: translateY(-20px) translateX(-50%); }
            60% { transform: translateY(-10px) translateX(-50%); }
        }

        .glass-panel {
            background: rgba(0, 0, 0, 0.6);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border: 1px solid rgba(212, 175, 55, 0.3);
            border-radius: 20px;
            padding: 2.5rem;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
        }
        
        .content-lore, .content-admin {
            animation: fadeIn 0.4s ease-out;
        }
        
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }

@media (max-width: 1023px) {
    /* Make safe-zone align content to the bottom cleanly */
    .safe-zone-content {
        padding-bottom: 120px !important;
    }
}

