:root {
            --red-main: #e60012;
            --red-dark: #c0000f;
            --red-soft: #ffe6ea;
            --black-main: #111111;
            --gray-bg: #f6f6f6;
            --gray-border: #e5e5e5;
            --text-muted: #777777;
        }

        * {
            box-sizing: border-box;
        }

        html, body {
            margin: 0;
            padding: 0;
            position: relative;
            min-height: 100vh;
            height: 100%;
        }

        body {
            font-family: 'Kanit', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
            padding-top: 70px; /* ปรับตามความสูง header จริง */
            background: transparent; /* สำคัญ */
            color: var(--black-main);
        }

        body::before {
            content: "";
            position: fixed;
            inset: 0;
            background-image: url('/images/bg/bg_1.png');
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            z-index: -1;
            pointer-events: none;
        }

        /* พื้นหลังเต็มหน้าจอ อยู่หลังสุด */
        .bg-fixed {
            position: fixed;
            inset: 0;
            width: 100vw;
            height: 100vh;
            background-image: url('/images/bg/bg_1.png');
            background-size: cover;
            background-position: center 0;  /* เริ่มจากบนสุด */
            background-repeat: no-repeat;
            z-index: -10;
            pointer-events: none;
            will-change: transform;        /* ช่วยให้ parallax ลื่นขึ้น */
        }

        /* โครงหลัก */
        .app {
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            padding-bottom: 80px; /* เว้นที่ให้ bottom nav */
        }

        .app-inner {
            max-width: 480px;
            margin: 0 auto;
            min-height: 100vh;
            position: relative;
        }

        /* ================= HEADER ================= */
       .top-header {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            z-index: 1000;

            background: var(--red-main);
            color: #ffffff;
            padding: 16px 16px 12px;

            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .logo-text {
            font-size: 20px;
            font-weight: 700;
            letter-spacing: 1px;
        }

        .logo-text span {
            display: block;
            font-size: 12px;
            font-weight: 400;
            letter-spacing: 2px;
        }

        .profile-thumb {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            border: 2px solid #ffffff;
            overflow: hidden;
        }

        .profile-thumb img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        /* ================= HERO CARD ================= */
        .hero-card-wrap {
            background-image: url('public/assets/images/bg/bg_01.png');
            background-size: cover;
            background-position: center top;
            background-repeat: no-repeat;

            /* ดันกล่องขาวลงจากขอบบนของ hero ประมาณ 20% ของหน้าจอ */
            padding: 20vh 16px 18px;
        }

        .hero-card {
            background: #ffffff;
            border-radius: 18px;
            padding: 16px 16px 14px;
            box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
        }

        .hero-row-top {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
        }

        .hero-greet {
            font-size: 14px;
            font-weight: 500;
            color: var(--black-main);
        }

        .hero-greet span {
            font-weight: 600;
            color: var(--red-main);
        }

        .hero-link {
            font-size: 12px;
            color: var(--red-main);
            display: inline-flex;
            align-items: center;
            gap: 4px;
        }

        .hero-main {
            display: flex;
            border-radius: 14px;
            border: 1px solid var(--gray-border);
            overflow: hidden;
        }

        .hero-main-col {
            flex: 1;
            padding: 10px 12px;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }

        .hero-main-col + .hero-main-col {
            border-left: 1px solid var(--gray-border);
        }

        .hero-main-label {
            font-size: 11px;
            color: var(--text-muted);
        }

        .hero-main-point {
            margin-top: 4px;
            font-size: 22px;
            font-weight: 700;
            color: var(--red-main);
        }

        .brand-points-row {
            display: flex;
            justify-content: space-between;
            margin-top: 10px;
        }

        .brand-point {
            flex: 1;
            text-align: center;
            font-size: 11px;
        }

        .brand-point + .brand-point {
            border-left: 1px solid var(--gray-border);
        }

        .brand-icon {
            width: 30px;
            height: 30px;
            border-radius: 50%;
            margin: 0 auto 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: var(--red-soft);
            color: var(--red-main);
            font-size: 16px;
        }

        .brand-score {
            font-size: 13px;
            font-weight: 600;
            color: var(--black-main);
        }

        /* ================= SHORTCUT MENU ================= */
        .shortcut-row {
            display: flex;
            padding: 12px 14px 10px;
            gap: 10px;
            overflow-x: auto;
            background: #ffffff;
        }

        .shortcut-btn {
            flex: 1;
            min-width: 80px;
            max-width: 120px;
            border-radius: 12px;
            background: #ffffff;
            border: 1px solid var(--gray-border);
            padding: 10px 8px;
            text-align: center;
            font-size: 11px;
            color: var(--black-main);
            white-space: nowrap;
        }

        .shortcut-btn-icon {
            width: 32px;
            height: 32px;
            margin: 0 auto 5px;
            border-radius: 50%;
            background: var(--red-soft);
            color: var(--red-main);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
        }

        /* ================= BANNER ================= */
        .banner-wrap {
            padding: 0 16px 16px;
            background: #ffffff;
        }

        .banner-card {
            border-radius: 16px;
            background: linear-gradient(135deg, #ff4d4f, #ff9f1c);
            color: #ffffff;
            padding: 16px 16px 18px;
            position: relative;
            overflow: hidden;
        }

        .banner-title {
            font-size: 18px;
            font-weight: 700;
            margin-bottom: 6px;
        }

        .banner-sub {
            font-size: 12px;
            line-height: 1.5;
            max-width: 70%;
        }

        .banner-phone {
            position: absolute;
            right: 0;
            bottom: 0;
            width: 40%;
            max-width: 160px;
            pointer-events: none;
        }

        .banner-dots {
            display: flex;
            gap: 6px;
            margin-top: 10px;
        }

        .banner-dot {
            width: 6px;
            height: 6px;
            border-radius: 999px;
            background: rgba(255,255,255,0.7);
        }

        .banner-dot.active {
            width: 16px;
            background: #ffffff;
        }

        /* ================= CONTENT PLACEHOLDER ================= */
        .content-placeholder {
            padding: 16px 16px 90px;
            background: #ffffff;
        }

        .section-title {
            font-size: 14px;
            font-weight: 600;
            margin-bottom: 8px;
        }

        .empty-box {
            border-radius: 12px;
            border: 1px dashed var(--gray-border);
            padding: 18px 14px;
            text-align: center;
            font-size: 12px;
            color: var(--text-muted);
        }

        /* ================= BOTTOM NAV ================= */
        .bottom-nav-wrap {
            position: fixed;
            left: 0;
            right: 0;
            bottom: 0;
            z-index: 50;
            display: flex;
            justify-content: center;
            padding-bottom: env(safe-area-inset-bottom, 0);
        }

        .bottom-nav {
            width: 100%;
            max-width: 480px;
            background: transparent;
        }

        .bottom-nav-inner {
            background: var(--red-main);
            border-radius: 18px 18px 0 0;
            padding: 10px 8px 8px;
            display: flex;
            justify-content: space-between;
            align-items: flex-end;
            position: relative;
        }

        .bottom-item {
            flex: 1;
            text-align: center;
            color: #ffffff;
            font-size: 11px;
        }

        .bottom-icon {
            font-size: 16px;
            display: block;
            margin-bottom: 2px;
        }

        /* ปุ่มกลางเด้งขึ้น */
        .bottom-center {
            position: absolute;
            left: 50%;
            transform: translateX(-50%) translateY(-30%);
            width: 70px;
            height: 70px;
            border-radius: 50%;
            background: #ffffff;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 1px 20px rgba(0,0,0,0.25);
        }

        .bottom-center-inner {
            width: 65px;
            height: 65px;
            border-radius: 50%;
            background: var(--red-main);
            display: flex;
            align-items: center;
            justify-content: center;
            color: #ffffff;
            font-size: 22px;
        }

        .bottom-nav-inner .bottom-item.is-center-placeholder {
            visibility: hidden; /* ช่องว่างตรงกลาง */
        }

        @media (max-width: 360px) {
            .hero-main-label {
                font-size: 10px;
            }
            .hero-main-point {
                font-size: 18px;
            }
            .bottom-nav-inner {
                padding: 8px 4px 6px;
            }
        }

        /* ================= MEMBER PROFILE PAGE ================= */

        .member-page {
            padding: 16px 16px 90px; /* ด้านล่างเผื่อ bottom nav */
            background: transparent;
        }

        /* การ์ดสรุปบนสุด */
        .member-summary-card {
            background: #ffffff;
            border-radius: 18px;
            padding: 16px 14px;
            box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
            display: flex;
            gap: 12px;
            align-items: center;
            margin-bottom: 16px;
        }

        .member-avatar {
            width: 60px;
            height: 60px;
            border-radius: 50%;
            border: 3px solid var(--red-main);
            overflow: hidden;
            flex-shrink: 0;
        }

        .member-avatar img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        .member-summary-main {
            flex: 1;
        }

        .member-name {
            font-size: 16px;
            font-weight: 600;
            color: var(--black-main);
            margin-bottom: 4px;
        }

        .member-code {
            font-size: 12px;
            color: var(--text-muted);
        }

        .member-tier-badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            margin-top: 6px;
            padding: 3px 8px;
            border-radius: 999px;
            background: var(--red-soft);
            color: var(--red-main);
            font-size: 11px;
            font-weight: 600;
        }

        .member-tier-badge i {
            font-size: 12px;
        }

        /* คะแนนสรุปฝั่งขวา */
        .member-summary-points {
            text-align: right;
            min-width: 90px;
        }

        .member-points-label {
            font-size: 11px;
            color: var(--text-muted);
        }

        .member-points-value {
            font-size: 18px;
            font-weight: 700;
            color: var(--red-main);
            margin-top: 2px;
        }

        /* กล่อง section */
        .member-section {
            margin-bottom: 16px;
            background: #ffffff;
            border-radius: 16px;
            padding: 14px 14px 10px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.03);
        }

        .member-section-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 8px;
        }

        .member-section-title {
            font-size: 14px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .member-section-title i {
            color: var(--red-main);
        }

        .member-section-action {
            font-size: 12px;
            color: var(--red-main);
            cursor: pointer;
        }

        /* รายการข้อมูลแบบแถวๆ */
        .member-info-list {
            border-top: 1px solid var(--gray-border);
            margin-top: 8px;
            padding-top: 6px;
        }

        .member-info-row {
            display: flex;
            justify-content: space-between;
            gap: 12px;
            padding: 6px 0;
            font-size: 12px;
        }

        .member-info-row + .member-info-row {
            border-top: 1px dashed var(--gray-border);
        }

        .member-info-label {
            color: var(--text-muted);
            min-width: 90px;
        }

        .member-info-value {
            text-align: right;
            color: var(--black-main);
        }

        /* ที่อยู่ – ให้เป็นบล็อกยาว */
        .member-address {
            font-size: 12px;
            color: var(--black-main);
            line-height: 1.5;
            margin-top: 6px;
        }

        /* แท็กสถานะเล็กๆ */
        .member-tag {
            display: inline-block;
            padding: 2px 7px;
            border-radius: 999px;
            font-size: 10px;
            background: var(--gray-bg);
            color: var(--text-muted);
            margin-left: 6px;
        }

        /* ปุ่มด้านล่าง */
        .member-actions {
            margin-top: 12px;
            display: flex;
            gap: 8px;
        }

        .member-btn {
            flex: 1;
            border-radius: 999px;
            padding: 8px 10px;
            font-size: 12px;
            border: 1px solid var(--red-main);
            background: #ffffff;
            color: var(--red-main);
            text-align: center;
        }

        .member-btn.solid {
            background: var(--red-main);
            color: #ffffff;
        }

        /* ปรับเล็กน้อยบนหน้าจอเล็กมาก */
        @media (max-width: 360px) {
            .member-summary-card {
                padding: 12px 10px;
                gap: 8px;
            }
            .member-name {
                font-size: 15px;
            }
            .member-points-value {
                font-size: 16px;
            }
        }
