        * {
            font-family: 'Prompt', 'Inter', -apple-system, sans-serif !important;
        }

        /* ===== ป้ายประกาศขยายเวลา (วางต่อท้าย style.css) =====
   ประสิทธิภาพ: ใช้เฉพาะ transform/opacity, ไม่มี blur/filter/JS วนซ้ำ */
        .ann-badge {
            position: relative;
            display: flex;
            align-items: center;
            gap: 0.65rem;
            width: fit-content;
            max-width: 100%;
            margin: 0 auto 1.5rem;
            padding: 0.45rem 1.2rem 0.45rem 0.45rem;
            border-radius: 999px;
            overflow: hidden;
            text-align: left;
            font-size: 1.2rem;
            line-height: 1.35;
            color: #fef3c7;
            background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(139, 92, 246, 0.16));
            border: 1px solid rgba(252, 211, 77, 0.45);
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 10px 28px -12px rgba(245, 158, 11, 0.5);
            animation: annIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
        }

        .ann-badge[hidden] {
            display: none;
        }

        /* แสงกวาดผ่านป้าย */
        .ann-badge::after {
            content: '';
            position: absolute;
            inset: 0;
            pointer-events: none;
            background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.28) 50%, transparent 65%);
            transform: translateX(-120%);
            animation: annSweep 3.6s ease-in-out 1.2s infinite;
            will-change: transform;
        }

        /* ป้าย "ประกาศ" สีทอง พร้อมวงคลื่นกระเพื่อม */
        .ann-tag {
            position: relative;
            flex-shrink: 0;
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            padding: 0.25rem 0.8rem;
            border-radius: 999px;
            font-size: 0.78rem;
            font-weight: 700;
            letter-spacing: 0.03em;
            color: #451a03;
            background: linear-gradient(135deg, #f59e0b, #fcd34d);
            box-shadow: 0 2px 10px rgba(245, 158, 11, 0.5);
        }

        .ann-tag::before {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: inherit;
            border: 2px solid #fbbf24;
            animation: annPing 2s ease-out infinite;
        }

        .ann-text b {
            color: #fde68a;
            font-weight: 700;
            white-space: nowrap;
            text-shadow: 0 0 12px rgba(251, 191, 36, 0.4);
        }

        @keyframes annIn {
            from {
                opacity: 0;
                transform: translateY(14px) scale(0.96);
            }

            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        @keyframes annSweep {
            0% {
                transform: translateX(-120%);
            }

            55%,
            100% {
                transform: translateX(120%);
            }
        }

        @keyframes annPing {
            from {
                transform: scale(1);
                opacity: 0.8;
            }

            to {
                transform: scale(1.45, 1.9);
                opacity: 0;
            }
        }

        /* จอเล็ก: ให้ขึ้นบรรทัดใหม่ได้โดยไม่เสียรูปทรง */
        @media (max-width: 480px) {
            .ann-badge {
                border-radius: 1.2rem;
                font-size: 0.85rem;
                padding: 0.6rem 1rem;
                flex-direction: column;
                text-align: center;
                justify-content: center;
            }
        }

        @media (prefers-reduced-motion: reduce) {

            .ann-badge,
            .ann-badge::after,
            .ann-tag::before {
                animation: none;
            }

            .ann-badge::after {
                display: none;
            }
        }


        /* ============================================================================== */

        .glass {
            background: rgba(15, 23, 42, 0.4) !important;
            backdrop-filter: blur(16px) !important;
            border: 1px solid rgba(255, 255, 255, 0.06) !important;
            box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15) !important;
        }

        .gradient-bg {
            background-color: #080b13 !important;
            background-image:
                radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.12) 0%, transparent 50%),
                radial-gradient(circle at 0% 100%, rgba(139, 92, 246, 0.08) 0%, transparent 40%),
                radial-gradient(circle at 100% 100%, rgba(167, 139, 250, 0.08) 0%, transparent 40%) !important;
        }

        .card-gradient {
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.06), rgba(139, 92, 246, 0.06)) !important;
        }

        .btn-primary,
        .canva-button.btn-primary {
            background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
            color: #fff !important;
            border: none !important;
            border-radius: 12px !important;
            padding: 0.8rem 2.4rem !important;
            font-weight: 600 !important;
            box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4) !important;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        }

        .btn-primary:hover,
        .canva-button.btn-primary:hover {
            transform: translateY(-2px) !important;
            box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5) !important;
        }

        /* Event Detail Card overrides (Easier & Cleaner) */
        .canva-card {
            border: 1px solid rgba(255, 255, 255, 0.05) !important;
            background: rgba(255, 255, 255, 0.02) !important;
            box-shadow: none !important;
            transition: all 0.3s ease !important;
        }

        .canva-card:hover {
            background: rgba(255, 255, 255, 0.04) !important;
            border-color: rgba(255, 255, 255, 0.12) !important;
            transform: translateY(-3px) !important;
        }

        /* FAQ Accordion overrides */
        #faq-list .glass {
            border: 1px solid rgba(255, 255, 255, 0.05) !important;
            background: rgba(255, 255, 255, 0.02) !important;
            margin-bottom: 0.75rem;
            transition: all 0.2s ease;
        }

        #faq-list .glass:hover {
            background: rgba(255, 255, 255, 0.04) !important;
            border-color: rgba(255, 255, 255, 0.1) !important;
        }

        /* Timeline track lights */
        .w-3.h-3.rounded-full {
            box-shadow: 0 0 10px currentColor;
        }

        .fade-in {
            animation: fadeIn 0.4s ease;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(10px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .nav-active {
            border-bottom: 2px solid #8b5cf6;
            color: #a78bfa;
        }

        .toast {
            animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.7s;
        }

        @keyframes slideIn {
            from {
                transform: translateX(100%);
            }

            to {
                transform: translateX(0);
            }
        }

        @keyframes fadeOut {
            to {
                opacity: 0;
            }
        }

        /* ===== Stepper / Registration styles (Premium Dark Glassmorphism) ===== */
        .main-card {
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 24px;
            background: rgba(15, 23, 42, 0.45);
            backdrop-filter: blur(20px);
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
            overflow: hidden;
            transition: all 0.3s ease;
        }

        .card-header-custom {
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
            color: #fff;
            padding: 2.25rem 2rem;
            text-align: center;
        }

        .card-header-custom h1 {
            font-weight: 700;
            font-size: 1.6rem;
            margin: 0;
            letter-spacing: -0.025em;
            background: linear-gradient(to right, #fff, #c7d2fe);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .card-header-custom p {
            margin: 0.5rem 0 0;
            opacity: 0.75;
            font-size: 0.9rem;
            color: #c7d2fe;
        }

        .reg-stepper {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 0;
            padding: 1.5rem 1rem;
            background: rgba(255, 255, 255, 0.02);
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        }

        .step-item {
            display: flex;
            align-items: center;
            gap: 0.6rem;
        }

        .step-circle {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
            font-size: 0.95rem;
            background: rgba(255, 255, 255, 0.08);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: rgba(255, 255, 255, 0.6);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .step-item.active .step-circle {
            background: linear-gradient(135deg, #6366F1, #8B5CF6);
            color: #fff;
            border-color: transparent;
            box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
            transform: scale(1.05);
        }

        .step-item.completed .step-circle {
            background: #10B981;
            color: #fff;
            border-color: transparent;
            box-shadow: 0 0 15px rgba(16, 185, 129, 0.35);
        }

        .step-label {
            font-size: 0.85rem;
            color: rgba(255, 255, 255, 0.5);
            font-weight: 500;
        }

        .step-item.active .step-label {
            color: #A78BFA;
            font-weight: 600;
            text-shadow: 0 0 8px rgba(167, 139, 250, 0.3);
        }

        .step-line {
            width: 40px;
            height: 2px;
            background: rgba(255, 255, 255, 0.1);
            margin: 0 0.75rem;
            align-self: center;
        }

        .step-line.active {
            background: linear-gradient(90deg, #6366F1, #8B5CF6);
        }

        .reg-form-section {
            display: none;
            padding: 2.5rem;
            background: transparent;
        }

        .reg-form-section.active {
            display: block;
        }

        .reg-section-title {
            font-weight: 600;
            color: #A78BFA;
            border-left: 4px solid #8B5CF6;
            padding-left: 12px;
            margin-bottom: 2rem;
            font-size: 1.25rem;
            text-shadow: 0 0 10px rgba(139, 92, 246, 0.2);
        }

        .required-star {
            color: #F87171;
            margin-left: 2px;
        }

        .btn-primary-reg {
            background: linear-gradient(135deg, #6366F1, #8B5CF6);
            border: none;
            font-weight: 600;
            padding: 0.75rem 2.25rem;
            border-radius: 12px;
            color: #fff;
            box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
            transition: all 0.2s ease;
        }

        .btn-primary-reg:hover {
            background: linear-gradient(135deg, #4F46E5, #7C3AED);
            transform: translateY(-1px);
            box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
        }

        .btn-outline-reg {
            border: 1px solid rgba(255, 255, 255, 0.2);
            color: rgba(255, 255, 255, 0.8);
            font-weight: 500;
            padding: 0.75rem 2.25rem;
            border-radius: 12px;
            background: rgba(255, 255, 255, 0.05);
            transition: all 0.2s ease;
        }

        .btn-outline-reg:hover {
            border-color: rgba(255, 255, 255, 0.4);
            background: rgba(255, 255, 255, 0.1);
            color: #fff;
            transform: translateY(-1px);
        }

        .upload-toggle {
            display: flex;
            gap: 0.5rem;
            margin-bottom: 0.75rem;
        }

        .upload-toggle .btn {
            font-size: 0.8rem;
            padding: 0.35rem 1rem;
            border-radius: 20px;
            border: 1px solid rgba(255, 255, 255, 0.12);
            background: rgba(255, 255, 255, 0.03);
            color: rgba(255, 255, 255, 0.7);
            transition: all 0.2s ease;
        }

        .upload-toggle .btn:hover {
            background: rgba(255, 255, 255, 0.08);
            color: #fff;
        }

        .upload-toggle .btn.active {
            background: linear-gradient(135deg, #6366F1, #8B5CF6) !important;
            border-color: transparent !important;
            color: #fff !important;
            box-shadow: 0 2px 10px rgba(99, 102, 241, 0.25);
        }

        .reg-loading-overlay {
            position: fixed;
            inset: 0;
            background: rgba(15, 23, 42, 0.8);
            backdrop-filter: blur(8px);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 9999;
            flex-direction: column;
            gap: 1rem;
        }

        .reg-loading-overlay.show {
            display: flex;
        }

        /* ===== Progress Card ===== */
        .reg-progress-card {
            background: rgba(15, 23, 42, 0.75);
            backdrop-filter: blur(20px);
            border: 1px solid rgba(139, 92, 246, 0.35);
            border-radius: 20px;
            padding: 2rem 2.5rem;
            width: min(420px, 90vw);
            box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
            text-align: center;
        }

        .reg-progress-icon {
            font-size: 2.5rem;
            margin-bottom: 0.75rem;
            animation: floatIcon 2s ease-in-out infinite;
        }

        @keyframes floatIcon {

            0%,
            100% {
                transform: translateY(0);
            }

            50% {
                transform: translateY(-6px);
            }
        }

        .reg-progress-card h3 {
            color: #fff;
            font-size: 1.05rem;
            font-weight: 600;
            margin: 0 0 1.25rem;
        }

        .reg-progress-track {
            background: rgba(255, 255, 255, 0.08);
            border-radius: 999px;
            height: 10px;
            overflow: hidden;
            margin-bottom: 0.5rem;
        }

        .reg-progress-fill {
            height: 100%;
            width: 0%;
            border-radius: 999px;
            background: linear-gradient(90deg, #6366F1, #8B5CF6, #A78BFA);
            background-size: 200% 100%;
            transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
            animation: shimmer 1.8s linear infinite;
        }

        @keyframes shimmer {
            0% {
                background-position: 200% center;
            }

            100% {
                background-position: -200% center;
            }
        }

        .reg-progress-pct {
            font-size: 0.8rem;
            color: #A78BFA;
            font-weight: 700;
            margin-bottom: 1.25rem;
            letter-spacing: 0.05em;
        }

        .reg-step-list {
            list-style: none;
            padding: 0;
            margin: 0;
            text-align: left;
            display: flex;
            flex-direction: column;
            gap: 0.6rem;
        }

        .reg-step-item {
            display: flex;
            align-items: center;
            gap: 0.6rem;
            font-size: 0.82rem;
            color: rgba(255, 255, 255, 0.35);
            padding: 0.5rem 0.75rem;
            border-radius: 10px;
            transition: all 0.3s ease;
        }

        .reg-step-item::before {
            content: '○';
            font-size: 0.7rem;
            flex-shrink: 0;
        }

        .reg-step-item.step-active {
            color: #fff;
            background: rgba(99, 102, 241, 0.15);
            border: 1px solid rgba(99, 102, 241, 0.3);
        }

        .reg-step-item.step-active::before {
            content: '';
            width: 10px;
            height: 10px;
            border: 2px solid #8B5CF6;
            border-top-color: transparent;
            border-radius: 50%;
            animation: spin 0.7s linear infinite;
            display: inline-block;
        }

        .reg-step-item.step-done {
            color: rgba(167, 243, 208, 0.9);
        }

        .reg-step-item.step-done::before {
            content: '✓';
            color: #34D399;
            font-weight: 700;
        }

        @keyframes spin {
            to {
                transform: rotate(360deg);
            }
        }

        .spinner-reg {
            width: 48px;
            height: 48px;
            border: 4px solid rgba(255, 255, 255, 0.15);
            border-top-color: #8B5CF6;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }

        @keyframes spin {
            to {
                transform: rotate(360deg);
            }
        }

        /* ===== Dark Glassmorphic Inputs Overrides inside Registration ===== */
        #view-register label {
            color: rgba(255, 255, 255, 0.75) !important;
            font-size: 0.85rem;
            font-weight: 500;
            margin-bottom: 0.5rem;
        }

        #view-register .form-control,
        #view-register .form-select {
            background-color: rgba(255, 255, 255, 0.04) !important;
            border: 1px solid rgba(255, 255, 255, 0.1) !important;
            color: #fff !important;
            border-radius: 12px !important;
            padding: 0.65rem 1rem !important;
            font-size: 0.9rem !important;
            transition: all 0.2s ease-in-out !important;
        }

        #view-register .form-control::placeholder {
            color: rgba(255, 255, 255, 0.3) !important;
        }

        #view-register .form-control:focus,
        #view-register .form-select:focus {
            background-color: rgba(255, 255, 255, 0.08) !important;
            border-color: #8B5CF6 !important;
            box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25) !important;
            outline: none !important;
        }

        #view-register .form-select {
            background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
        }

        #view-register select option {
            background-color: #1e1b4b !important;
            color: #fff !important;
        }

        #view-register .is-invalid {
            border-color: #EF4444 !important;
            box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25) !important;
        }

        /* ===== SweetAlert2 Glossy Dark Theme Overrides ===== */
        .swal2-popup {
            background: rgba(15, 23, 42, 0.9) !important;
            backdrop-filter: blur(20px) !important;
            border: 1px solid rgba(255, 255, 255, 0.1) !important;
            border-radius: 20px !important;
            color: #fff !important;
            box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5) !important;
        }

        .swal2-title {
            color: #fff !important;
            font-family: 'Prompt', sans-serif !important;
        }

        .swal2-html-container {
            color: rgba(255, 255, 255, 0.75) !important;
            font-family: 'Prompt', sans-serif !important;
        }

        .swal2-confirm {
            background: linear-gradient(135deg, #6366F1, #8B5CF6) !important;
            box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4) !important;
            border-radius: 12px !important;
            padding: 0.75rem 2rem !important;
            font-weight: 600 !important;
        }

        .swal2-cancel {
            background: rgba(255, 255, 255, 0.05) !important;
            border: 1px solid rgba(255, 255, 255, 0.1) !important;
            color: rgba(255, 255, 255, 0.8) !important;
            border-radius: 12px !important;
            padding: 0.75rem 2rem !important;
        }

        @media (max-width: 576px) {
            .step-label {
                display: none;
            }

            .step-line {
                width: 24px;
            }

            .reg-form-section {
                padding: 1.5rem;
            }
        }

        /* ===== Rules Popup Modal ===== */
        #rulesPopupOverlay {
            position: fixed;
            inset: 0;
            z-index: 10000;
            display: none;
            align-items: center;
            justify-content: center;
            background: rgba(5, 10, 30, 0.85);
            backdrop-filter: blur(12px);
            padding: 1rem;
        }

        #rulesPopupOverlay.show {
            display: flex;
        }

        .rules-modal {
            background: rgba(15, 23, 42, 0.95);
            border: 1px solid rgba(139, 92, 246, 0.4);
            border-radius: 24px;
            width: min(740px, 100%);
            max-height: 90vh;
            display: flex;
            flex-direction: column;
            box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.08);
            overflow: hidden;
            animation: rulesSlideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        @keyframes rulesSlideUp {
            from {
                opacity: 0;
                transform: translateY(40px) scale(0.96);
            }

            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        .rules-modal-header {
            padding: 1.75rem 2rem 1.25rem;
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(139, 92, 246, 0.18));
            border-bottom: 1px solid rgba(255, 255, 255, 0.07);
            flex-shrink: 0;
            text-align: center;
        }

        .rules-modal-header .rules-icon {
            font-size: 2.4rem;
            margin-bottom: 0.5rem;
        }

        .rules-modal-header h2 {
            font-size: 1.35rem;
            font-weight: 700;
            color: #fff;
            margin: 0 0 0.25rem;
            background: linear-gradient(to right, #fff, #c7d2fe);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .rules-modal-header p {
            font-size: 0.85rem;
            color: rgba(199, 210, 254, 0.8);
            margin: 0;
        }

        .rules-modal-body {
            flex: 1;
            overflow-y: auto;
            padding: 1.5rem 2rem;
            scrollbar-width: thin;
            scrollbar-color: rgba(139, 92, 246, 0.4) transparent;
        }

        .rules-modal-body::-webkit-scrollbar {
            width: 6px;
        }

        .rules-modal-body::-webkit-scrollbar-track {
            background: transparent;
        }

        .rules-modal-body::-webkit-scrollbar-thumb {
            background: rgba(139, 92, 246, 0.4);
            border-radius: 99px;
        }

        .rules-item {
            padding: 1rem 1.25rem;
            border-radius: 14px;
            border: 1px solid rgba(255, 255, 255, 0.06);
            background: rgba(255, 255, 255, 0.025);
            margin-bottom: 0.75rem;
            font-size: 0.875rem;
            line-height: 1.7;
            color: rgba(199, 210, 254, 0.9);
            transition: border-color 0.2s;
        }

        .rules-item:hover {
            border-color: rgba(139, 92, 246, 0.3);
        }

        .rules-item-title {
            font-weight: 700;
            color: #A78BFA;
            font-size: 0.9rem;
            margin-bottom: 0.4rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .rules-item-title .rules-num {
            background: linear-gradient(135deg, #6366f1, #8b5cf6);
            color: #fff;
            font-size: 0.72rem;
            font-weight: 700;
            width: 22px;
            height: 22px;
            border-radius: 50%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .rules-note {
            background: rgba(234, 179, 8, 0.08);
            border: 1px solid rgba(234, 179, 8, 0.25);
            border-radius: 10px;
            padding: 0.65rem 0.9rem;
            font-size: 0.82rem;
            color: rgba(253, 224, 71, 0.9);
            margin-top: 0.5rem;
        }

        .rules-modal-footer {
            flex-shrink: 0;
            padding: 1.25rem 2rem;
            background: rgba(0, 0, 0, 0.2);
            border-top: 1px solid rgba(255, 255, 255, 0.06);
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 0.75rem;
        }

        .rules-modal-footer p {
            font-size: 0.82rem;
            color: rgba(199, 210, 254, 0.7);
            margin: 0;
            text-align: center;
        }

        .btn-rules-accept {
            background: linear-gradient(135deg, #6366F1, #8B5CF6);
            border: none;
            color: #fff;
            font-weight: 700;
            font-size: 1rem;
            padding: 0.8rem 2.5rem;
            border-radius: 14px;
            cursor: pointer;
            box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
            transition: all 0.2s ease;
            width: 100%;
            max-width: 320px;
        }

        .btn-rules-accept:hover {
            background: linear-gradient(135deg, #4F46E5, #7C3AED);
            transform: translateY(-2px);
            box-shadow: 0 6px 24px rgba(99, 102, 241, 0.5);
        }

        .btn-rules-cancel {
            background: transparent;
            border: none;
            color: rgba(199, 210, 254, 0.5);
            font-size: 0.82rem;
            cursor: pointer;
            text-decoration: underline;
            padding: 0;
        }

        .btn-rules-cancel:hover {
            color: rgba(199, 210, 254, 0.8);
        }

        @media (max-width: 576px) {
            .rules-modal-header {
                padding: 1.25rem 1.25rem 1rem;
            }

            .rules-modal-body {
                padding: 1.25rem;
            }

            .rules-modal-footer {
                padding: 1rem 1.25rem;
            }
        }

        /* Make text-muted more visible on dark backgrounds */
        .text-muted {
            color: #c7d2fe88 !important;
        }

        /* ===== Custom Checkbox Fix (Tailwind + Bootstrap conflict) ===== */
        .form-check-input[type="checkbox"] {
            -webkit-appearance: none !important;
            -moz-appearance: none !important;
            appearance: none !important;
            width: 1.2rem !important;
            height: 1.2rem !important;
            border: 2px solid rgba(255, 255, 255, 0.35) !important;
            border-radius: 5px !important;
            background-color: rgba(255, 255, 255, 0.07) !important;
            background-image: none !important;
            cursor: pointer !important;
            flex-shrink: 0 !important;
            transition: all 0.2s ease !important;
            position: relative !important;
        }

        .form-check-input[type="checkbox"]:checked {
            background-color: #8B5CF6 !important;
            border-color: #8B5CF6 !important;
            background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 5-5'/%3e%3c/svg%3e") !important;
            background-size: 100% 100% !important;
            background-position: center !important;
            background-repeat: no-repeat !important;
        }

        .form-check-input[type="checkbox"]:focus {
            box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.35) !important;
            border-color: #8B5CF6 !important;
            outline: none !important;
        }

        /* ============================================ 3D Timeline ========================================== */
        .tl3d-section {
            max-width: 64rem;
            margin: 0 auto;
            padding: 3rem 1rem 4rem;
        }

        .tl3d-stage {
            position: relative;
            perspective: 1100px;
            perspective-origin: 50% 35%;
        }

        /* พื้นกริดเอียงด้านหลังการ์ด ให้เห็นมิติลึก */
        .tl3d-floor {
            position: absolute;
            left: 0;
            right: 0;
            bottom: -36px;
            height: 220px;
            transform: rotateX(68deg);
            transform-origin: 50% 100%;
            background-image:
                linear-gradient(rgba(139, 92, 246, 0.32) 1px, transparent 1px),
                linear-gradient(90deg, rgba(139, 92, 246, 0.32) 1px, transparent 1px);
            background-size: 44px 44px;
            -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 92%);
            mask-image: linear-gradient(to top, #000 0%, transparent 92%);
            pointer-events: none;
        }

        .tl3d-board {
            --gap: 1.25rem;
            list-style: none;
            margin: 0;
            padding: 0;
            position: relative;
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: var(--gap);
            transform-style: preserve-3d;
        }

        /* ===== Item ===== */
        .tl3d-item {
            --base: 0deg;
            --cz: 0px;
            --seg: 0;
            position: relative;
            display: flex;
            flex-direction: column;
            padding-top: 68px;
            transform-style: preserve-3d;
            touch-action: pan-y;
        }

        /* การ์ดเรียงเป็นส่วนโค้ง หันเข้าหากึ่งกลาง */
        .tl3d-item:nth-child(1) {
            --base: 18deg;
            --cz: 0px;
        }

        .tl3d-item:nth-child(2) {
            --base: 7deg;
            --cz: 40px;
        }

        .tl3d-item:nth-child(3) {
            --base: -7deg;
            --cz: 40px;
        }

        .tl3d-item:nth-child(4) {
            --base: -18deg;
            --cz: 0px;
        }

        /* ก้านเชื่อมจุดกับการ์ด */
        .tl3d-item::before {
            content: '';
            position: absolute;
            top: 44px;
            left: 50%;
            width: 1px;
            height: 24px;
            background: linear-gradient(rgba(167, 139, 250, 0.55), transparent);
        }

        /* เส้นเวลาช่วงจากจุดนี้ไปจุดถัดไป (เติมสีตามเวลาจริง ผ่าน --seg) */
        .tl3d-item:not(:last-child)::after {
            content: '';
            position: absolute;
            top: 21px;
            left: 50%;
            width: calc(100% + var(--gap));
            height: 2px;
            border-radius: 2px;
            background:
                linear-gradient(90deg, #6366f1, #a78bfa) 0 0 / calc(var(--seg) * 100%) 100% no-repeat,
                rgba(255, 255, 255, 0.1);
            box-shadow: 0 0 10px rgba(139, 92, 246, 0.25);
        }

        /* ===== Node ===== */
        .tl3d-node {
            position: absolute;
            top: 0;
            left: 50%;
            z-index: 2;
            width: 44px;
            height: 44px;
            margin-left: -22px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #a78bfa;
            background: #0d1224;
            border: 1px solid rgba(167, 139, 250, 0.35);
        }

        .tl3d-node svg {
            width: 20px;
            height: 20px;
        }

        /* ===== Card ===== */
        .tl3d-card {
            --rx: 0deg;
            --ry: 0deg;
            position: relative;
            flex: 1;
            transform-style: preserve-3d;
            transform: translateZ(var(--cz)) rotateX(var(--rx)) rotateY(calc(var(--base) + var(--ry)));
            transition: transform 0.25s ease-out;
        }

        /* แผ่นหลังการ์ด ให้เห็นความหนาเมื่อเอียง */
        .tl3d-card::before {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: 14px;
            background: rgba(99, 102, 241, 0.12);
            border: 1px solid rgba(167, 139, 250, 0.18);
            transform: translateZ(-18px);
        }

        /* หน้ากระจก (แยกจากเนื้อหา เพราะ backdrop-filter ทำให้ลูกข้างในแบนราบ) */
        .tl3d-face {
            position: absolute;
            inset: 0;
            border-radius: 14px;
            background: rgba(15, 23, 42, 0.6);
            -webkit-backdrop-filter: blur(12px);
            backdrop-filter: blur(12px);
            border: 1px solid rgba(255, 255, 255, 0.09);
            box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
            transition: border-color 0.3s ease, box-shadow 0.3s ease;
        }

        .tl3d-content {
            position: relative;
            height: 100%;
            padding: 1.1rem 0.75rem 1.2rem;
            text-align: center;
            transform: translateZ(26px);
        }

        .tl3d-date b {
            display: block;
            font-size: 2rem;
            line-height: 1;
            font-weight: 700;
            color: #fff;
        }

        .tl3d-date span {
            display: block;
            margin-top: 0.3rem;
            font-size: 0.75rem;
            color: #a5b4fc;
        }

        .tl3d-name {
            margin-top: 0.75rem;
            padding-top: 0.75rem;
            border-top: 1px solid rgba(255, 255, 255, 0.08);
            font-size: 0.9rem;
            font-weight: 600;
            line-height: 1.4;
            color: #e0e7ff;
        }

        .tl3d-badge {
            display: none;
            width: max-content;
            margin: 0 auto 0.6rem;
            padding: 0.1rem 0.7rem;
            border-radius: 999px;
            font-size: 0.7rem;
            font-weight: 600;
        }

        /* ===== สถานะ: ผ่านแล้ว ===== */
        .tl3d-item.is-done .tl3d-node {
            color: #fff;
            background: #10b981;
            border-color: transparent;
            box-shadow: 0 0 14px rgba(16, 185, 129, 0.4);
        }

        .tl3d-item.is-done .tl3d-content {
            opacity: 0.75;
        }

        .tl3d-item.is-done .tl3d-badge {
            display: block;
            background: rgba(16, 185, 129, 0.16);
            color: #6ee7b7;
        }

        /* ===== สถานะ: ถัดไป ===== */
        .tl3d-item.is-next .tl3d-node {
            color: #fff;
            background: linear-gradient(135deg, #6366f1, #8b5cf6);
            border-color: transparent;
            animation: tl3dPulse 2.2s ease-out infinite;
        }

        .tl3d-item.is-next .tl3d-face {
            border-color: rgba(167, 139, 250, 0.55);
            box-shadow: 0 0 40px rgba(99, 102, 241, 0.28), 0 4px 30px rgba(0, 0, 0, 0.2);
        }

        .tl3d-item.is-next .tl3d-badge {
            display: block;
            background: rgba(139, 92, 246, 0.22);
            color: #ddd6fe;
        }

        @keyframes tl3dPulse {
            0% {
                box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.55);
            }

            100% {
                box-shadow: 0 0 0 16px rgba(139, 92, 246, 0);
            }
        }

        /* ===== มือถือ / แท็บเล็ตแคบ: แนวตั้ง ===== */
        @media (max-width: 860px) {
            .tl3d-floor {
                display: none;
            }

            .tl3d-board {
                grid-template-columns: 1fr;
            }

            .tl3d-item:nth-child(n) {
                --base: 0deg;
                --cz: 0px;
            }

            .tl3d-item {
                padding: 0 0 0 64px;
            }

            .tl3d-item::before {
                display: none;
            }

            .tl3d-item:not(:last-child)::after {
                top: 22px;
                left: 21px;
                width: 2px;
                height: calc(100% + var(--gap));
                background:
                    linear-gradient(180deg, #6366f1, #a78bfa) 0 0 / 100% calc(var(--seg) * 100%) no-repeat,
                    rgba(255, 255, 255, 0.1);
            }

            .tl3d-node {
                left: 0;
                margin-left: 0;
            }

            .tl3d-content {
                text-align: left;
                padding: 1rem 1.1rem;
            }

            .tl3d-badge {
                margin-left: 0;
            }
        }

        @media (prefers-reduced-motion: reduce) {
            .tl3d-item.is-next .tl3d-node {
                animation: none;
            }

            .tl3d-card {
                transition: none;
            }
        }

        /* =====================================================================
   อัปเกรดความอลังการ: ฉาก 3D พารัลแลกซ์ / อนุภาค / แสง / บินเข้า
   ===================================================================== */
        .tl3d-world {
            position: relative;
            transform-style: preserve-3d;
            will-change: transform;
        }

        /* พื้นกริดวิ่งเข้าหาผู้ชม */
        .tl3d-floor {
            animation: tl3dGrid 2.4s linear infinite;
            box-shadow: inset 0 -40px 60px -30px rgba(139, 92, 246, 0.35);
        }

        @keyframes tl3dGrid {
            to {
                background-position: 0 44px, 0 0;
            }
        }

        /* อนุภาคลอยในมิติลึกต่างกัน */
        .tl3d-particles {
            position: absolute;
            inset: -60px;
            transform-style: preserve-3d;
            pointer-events: none;
        }

        .tl3d-particles span {
            position: absolute;
            width: var(--s);
            height: var(--s);
            border-radius: 50%;
            background: #c4b5fd;
            box-shadow: 0 0 10px 2px rgba(167, 139, 250, 0.7);
            transform: translateZ(var(--z));
            opacity: 0.8;
            animation: tl3dDrift var(--d) ease-in-out var(--dl) infinite alternate;
        }

        @keyframes tl3dDrift {
            from {
                translate: 0 18px;
                opacity: 0.25;
            }

            to {
                translate: 8px -26px;
                opacity: 0.95;
            }
        }

        /* เงาหยดสว่างตามเมาส์บนหน้าการ์ด (glare) */
        .tl3d-face::after {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: inherit;
            background: radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.16), transparent 55%);
            opacity: 0;
            transition: opacity 0.3s ease;
            pointer-events: none;
        }

        .tl3d-item:hover .tl3d-face::after {
            opacity: 1;
        }

        .tl3d-item:hover {
            --cz: 70px;
        }

        .tl3d-item:hover .tl3d-face {
            border-color: rgba(167, 139, 250, 0.5);
        }

        /* ตัวเลขวันที่ไล่สี */
        .tl3d-date b {
            background: linear-gradient(180deg, #fff 25%, #c7d2fe);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .tl3d-item.is-next .tl3d-date b {
            filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.65));
        }

        /* กำหนดการถัดไป: การ์ดลอยเข้าออกในแนวลึก (ไม่ขยับขึ้นลง จุดกับเส้นเวลาจึงติดกันเสมอ) + ลำแสง + วงโคจร */
        .tl3d-item.is-next .tl3d-card {
            animation: tl3dFloat 4.5s ease-in-out infinite;
        }

        @keyframes tl3dFloat {

            0%,
            100% {
                translate: 0 0 0;
            }

            50% {
                translate: 0 0 22px;
            }
        }

        .tl3d-item.is-next .tl3d-node::before {
            content: '';
            position: absolute;
            left: 50%;
            bottom: 100%;
            width: 2px;
            height: 90px;
            margin-left: -1px;
            background: linear-gradient(to top, rgba(196, 181, 253, 0.95), transparent);
            pointer-events: none;
        }

        .tl3d-item.is-next .tl3d-node::after {
            content: '';
            position: absolute;
            inset: -12px;
            border-radius: 50%;
            border: 1.5px dashed rgba(196, 181, 253, 0.75);
            transform: perspective(180px) rotateX(68deg);
            animation: tl3dOrbit 5s linear infinite;
            pointer-events: none;
        }

        @keyframes tl3dOrbit {
            from {
                transform: perspective(180px) rotateX(68deg) rotateZ(0deg);
            }

            to {
                transform: perspective(180px) rotateX(68deg) rotateZ(360deg);
            }
        }

        /* ===== บินเข้าเมื่อเลื่อนมาถึง (JS ใส่คลาส pre แล้วเปลี่ยนเป็น in) ===== */
        .tl3d-item.pre .tl3d-card,
        .tl3d-item.pre .tl3d-node,
        .tl3d-item.pre::before,
        .tl3d-item.pre::after {
            opacity: 0;
        }

        .tl3d-item.in .tl3d-card {
            animation: tl3dFlyIn 1.1s cubic-bezier(0.16, 1, 0.3, 1) backwards;
            animation-delay: calc(var(--i, 0) * 150ms);
        }

        .tl3d-item.in .tl3d-node {
            animation: tl3dPop 0.6s ease-out backwards;
            animation-delay: calc(var(--i, 0) * 150ms);
        }

        .tl3d-item.in.is-next .tl3d-node {
            animation: tl3dPop 0.6s ease-out backwards, tl3dPulse 2.2s ease-out infinite;
            animation-delay: calc(var(--i, 0) * 150ms), 0s;
        }

        .tl3d-item.in.is-next .tl3d-card {
            animation: tl3dFlyIn 1.1s cubic-bezier(0.16, 1, 0.3, 1) backwards, tl3dFloat 4.5s ease-in-out infinite;
            animation-delay: calc(var(--i, 0) * 150ms), calc(var(--i, 0) * 150ms + 1.1s);
        }

        .tl3d-item.in:not(:last-child)::after {
            animation: tl3dDraw 0.9s ease-out backwards;
            animation-delay: calc(var(--i, 0) * 150ms + 300ms);
        }

        @keyframes tl3dFlyIn {
            from {
                opacity: 0;
                translate: 0 70px -700px;
                rotate: x 40deg;
            }
        }

        @keyframes tl3dPop {
            0% {
                scale: 0;
                opacity: 0;
            }

            60% {
                scale: 1.3;
            }

            100% {
                scale: 1;
                opacity: 1;
            }
        }

        @keyframes tl3dDraw {
            from {
                clip-path: inset(0 100% 0 0);
            }

            to {
                clip-path: inset(0 0 0 0);
            }
        }

        @keyframes tl3dDrawV {
            from {
                clip-path: inset(0 0 100% 0);
            }

            to {
                clip-path: inset(0 0 0 0);
            }
        }

        @media (max-width: 860px) {
            .tl3d-particles {
                display: none;
            }

            .tl3d-item.in:not(:last-child)::after {
                animation-name: tl3dDrawV;
            }

            .tl3d-item:hover {
                --cz: 0px;
            }
        }

        @media (prefers-reduced-motion: reduce) {

            .tl3d-floor,
            .tl3d-particles span,
            .tl3d-item.is-next .tl3d-card,
            .tl3d-item.in.is-next .tl3d-card,
            .tl3d-item.is-next .tl3d-node::after,
            .tl3d-item.in .tl3d-card,
            .tl3d-item.in .tl3d-node,
            .tl3d-item.in:not(:last-child)::after {
                animation: none;
            }
        }