/* --- Layout System --- */
        body { font-family: 'Anuphan', sans-serif; margin: 0; background: #f8fafc; color: #334155; height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
        
        /* Navbar */
        .srt-navbar { background-color: #540906; color: white; flex: 0 0 auto; padding: 0.5rem 1rem; box-shadow: 0 2px 4px rgba(0,0,0,0.2); z-index: 100; }
        .srt-brand { text-decoration: none; color: white; display: flex; align-items: center; gap: 10px; font-family: 'Sarabun', sans-serif; }
        .srt-brand img { height: 45px; width: auto; } 
        .srt-brand-text { display: flex; flex-direction: column; line-height: 1.2; }
        .srt-brand-th { font-weight: bold; font-size: 1rem; }
        .srt-brand-en { font-size: 0.7rem; opacity: 0.8; letter-spacing: 0.5px; }
        .lang-switch a { text-decoration: none; margin-left: 8px; opacity: 0.7; transition: opacity 0.2s; }
        .lang-switch a:hover, .lang-switch a.active { opacity: 1; }
        .lang-switch img { height: 20px; border-radius: 2px; border: 1px solid rgba(255,255,255,0.2); }

        /* Controls Bar */
        .controls-bar { flex: 0 0 auto; padding: 8px 15px; background: white; border-bottom: 1px solid #cbd5e1; display: flex; gap: 8px; align-items: center; box-shadow: 0 2px 4px rgba(0,0,0,0.05); z-index: 50; flex-wrap: wrap; }
        
        /* Table Viewport */
        .table-viewport { flex: 1; width: 100vw; overflow: auto; position: relative; background: #fff; }
        #timetable { min-width: 100%; width: max-content; border-collapse: separate; border-spacing: 0; }
        
        /* Footer */
        .footer-bar { flex: 0 0 auto; background: #fff; border-top: 1px solid #cbd5e1; box-shadow: 0 -2px 10px rgba(0,0,0,0.05); z-index: 60; transition: all 0.3s ease; }
        .footer-toggle { padding: 10px 15px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; background: #f8fafc; user-select: none; }
        .footer-toggle:hover { background: #f1f5f9; }
        .footer-title { font-weight: bold; color: #334155; font-size: 0.9rem; display: flex; align-items: center; gap: 8px; }
        .footer-hint { font-size: 0.75rem; color: #64748b; font-weight: normal; margin-left: 5px; }
        .toggle-icon { transition: transform 0.3s ease; color: #64748b; }
        .toggle-icon.rotated { transform: rotate(180deg); }
        .footer-content { display: none; padding: 0 15px 15px 15px; border-top: 1px solid #e2e8f0; background: #fff; }
        .footer-rules ul { margin: 10px 0 0 20px; padding: 0; font-size: 0.8rem; color: #475569; }
        .footer-rules li { margin-bottom: 4px; }
        .footer-credit { font-size: 0.7rem; color: #94a3b8; margin-top: 10px; text-align: right; border-top: 1px dashed #e2e8f0; padding-top: 5px; }

        /* Table Styles */
        th, td { padding: 6px 4px; border-bottom: 1px solid #e2e8f0; border-right: 1px solid #e2e8f0; text-align: center; font-size: 0.9rem; vertical-align: middle; white-space: nowrap; }
        #timetable thead th:not(:first-child), #timetable tbody td { min-width: 90px; max-width: 90px; width: 90px; overflow: hidden; text-overflow: ellipsis; }
        #timetable thead th { position: sticky; top: 0; z-index: 10; color: #fff; border-bottom: 2px solid #fff; height: 75px; } 
        .th-content { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 100%; }
        
        .train-num { font-size: 1.1rem; font-weight: bold; line-height: 1; margin-bottom: 2px; }
        .train-num a { color: #fff; text-decoration: none; border-bottom: 1px dotted rgba(255,255,255,0.5); transition: all 0.2s; }
        .train-num a:hover { color: #ffd700; border-bottom: 1px solid #ffd700; text-shadow: 0 0 5px rgba(0,0,0,0.3); }

        .train-name { font-size: 0.65rem; font-weight: normal; opacity: 0.9; white-space: normal; line-height: 1.1; }
        .train-route { font-size: 0.6rem; background: rgba(0,0,0,0.2); padding: 1px 6px; border-radius: 10px; margin-top: 3px; color: #fff; font-weight: 600; }
        
        .bg-special { background: #be123c; } .bg-express { background: #db2777; } .bg-rapid { background: #2563eb; } 
        .bg-ordinary { background: #64748b; } .bg-local { background: #059669; } .bg-tourist { background: #ca8a04; } .bg-suburban { background: #7c3aed; }
        
        #timetable tbody th { position: sticky; left: 0; z-index: 5; text-align: left; border-right: 2px solid #cbd5e1; background-color: inherit; font-weight: 600; min-width: 200px; max-width: 200px; padding: 0; }
        #timetable thead th:first-child { position: sticky; top: 0; left: 0; z-index: 20; background: #0f172a; border-right: 2px solid #475569; min-width: 200px; max-width: 200px; }
        
        .station-cell { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; height: 100%; gap: 8px; }
        .station-info { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; width: 100%; }
        .station-name { font-size: 0.95rem; line-height: 1.2; font-weight: bold; color: #1e293b; }
        .station-meta { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; } 
        .station-km { font-size: 0.75rem; color: #64748b; font-weight: normal; white-space: nowrap; margin-left: auto; align-self: flex-start; margin-top: 2px; }
        
        .badge-base { font-size: 0.6rem; padding: 1px 4px; border-radius: 3px; font-weight: normal; line-height: 1; white-space: nowrap; display: inline-block; border: 1px solid transparent; }
        .tag-hua { background: #ffe4e6; color: #be123c; border-color: #fda4af; } 
        .tag-aphi { background: #dbeafe; color: #1d4ed8; border-color: #93c5fd; } 
        .tag-thon { background: #ffedd5; color: #c2410c; border-color: #fdba74; }
        .badge-nav { background-color: #f1f5f9; color: #475569; border-color: #cbd5e1; font-style: italic; }
        
        .conn-mrt-blue { background: #1a237e; color: white; } .conn-mrt-purp { background: #6a1b9a; color: white; }
        .conn-bts-green { background: #4caf50; color: white; } .conn-red { background: #b71c1c; color: white; }
        .conn-green { background: #C5DC9C; color: black; } .conn-green-ne { background: #64914A; color: white; }
        .conn-pink { background: #ec407a; color: white; } .conn-yell { background: #fbc02d; color: black; }
        .conn-arl { background: #2b99f0; color: white; } .conn-bus { background: #fb8c00; color: white; }
        .conn-air { background: #0288d1; color: white; } .conn-blue { background: #2DB7B9; color: white; }
        .conn-srt-ld { background: #F3B937; color: black; }

        .group-hua { background-color: #fff1f2 !important; } .group-aphi { background-color: #eff6ff !important; } 
        .group-thon { background-color: #fff7ed !important; } .group-main { background-color: #ffffff !important; }
        
        .time-cell { font-family: 'Anuphan', monospace; font-weight: 600; letter-spacing: 0.5px; }
        .time-dash { color: #cbd5e1; } .time-arr { color: #2563eb; } .time-dep { color: #0f172a; }
        .time-pass { color: #cbd5e1; font-weight: bold; font-family: monospace; } 
        
        /* Updated Colors */
        .time-aphiwat { background-color: #29648e !important; color: #ffffff !important; font-weight: 900 !important; border-radius: 4px; padding: 2px 6px; box-shadow: 0 1px 2px rgba(0,0,0,0.2); display: inline-block; }
        .time-aphiwat-text { color: #0d47a1 !important; font-weight: 900 !important; }
        .time-hua-origin { background-color: #aa242b !important; color: #ffffff !important; font-weight: 800 !important; border-radius: 4px; padding: 2px 6px; box-shadow: 0 1px 2px rgba(0,0,0,0.2); display: inline-block; }
        .time-thon-origin { background-color: #377a4f !important; color: #ffffff !important; font-weight: 800 !important; border-radius: 4px; padding: 2px 6px; box-shadow: 0 1px 2px rgba(0,0,0,0.2); display: inline-block; }
        .time-origin { background-color: #f4c575 !important; color: #191816 !important; font-weight: 800 !important; border-radius: 4px; padding: 2px 6px; box-shadow: 0 1px 2px rgba(0,0,0,0.2); display: inline-block; } 
        .time-dest { border-bottom: 3px solid #1e293b !important; font-weight: bold !important; color: #1e293b !important; display: inline-block; line-height: 1.2; }

        /* Highlight Hover */
        td.highlight-col { background-color: #f1f5f9 !important; }
        tbody tr:hover > * { background-color: #f1f5f9 !important; transition: background-color 0.1s; }
        tbody tr:hover > td.highlight-col { background-color: #e2e8f0 !important; font-weight: bold; color: #000 !important; }
        thead th.highlight-col { background-color: #e2e8f0 !important; color: #0f172a !important; border-bottom: 2px solid #cbd5e1 !important; }
        thead th.highlight-col .train-num a { color: #0f172a !important; border-bottom: 1px dotted #0f172a !important; text-shadow: none !important; }
        thead th.highlight-col .train-name { color: #334155 !important; opacity: 1 !important; }
        
        #loader { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255,255,255,0.95); z-index: 100; display: flex; justify-content: center; align-items: center; }

        .clickable-time { cursor: pointer; border-bottom: 1px dotted transparent; transition: all 0.2s; display: inline-block; min-width: 40px; }
        .clickable-time:hover { border-bottom: 2px dotted #0f172a; background-color: rgba(255, 235, 59, 0.4); border-radius: 3px; color: #000 !important; }

        /* Swap Button Style */
        .btn-swap { cursor: pointer; width: 40px; height: 40px; border-radius: 50%; background-color: #f1f5f9; display: inline-flex; justify-content: center; align-items: center; color: #64748b; transition: all 0.2s; }
        .btn-swap:hover { background-color: #e2e8f0; color: #2563eb; transform: scale(1.1); }
        .btn-swap:active { transform: scale(0.9); }
        .btn-swap i { transition: transform 0.3s; }
        .rotated-swap i { transform: rotate(180deg); }

        @media (max-width: 767px) {
            .controls-bar { justify-content: space-between; padding-top: 10px; padding-bottom: 10px; }
            .controls-bar > div:first-child { flex: 0 0 100%; margin-bottom: 8px; border-bottom: 1px dashed #e2e8f0; padding-bottom: 5px; }
            #selLine, #selTrip { flex: 1; width: auto !important; min-width: 0; }
            .controls-bar button { flex: 0 0 auto; }
            .station-km { display: none !important; }
            .station-name { font-size: 0.9rem; }
        }
		
		/* --- [NEW] Train Running Day Badges --- */
.badge-run-day {
    display: block; /* บังคับขึ้นบรรทัดใหม่ */
    font-size: 0.6rem;
    padding: 1px 4px;
    border-radius: 4px;
    margin-top: 2px;
    font-weight: normal;
    white-space: nowrap;
    line-height: 1.2;
}

/* สีสำหรับแต่ละประเภท */
.run-weekday { 
    background-color: #e2e8f0; 
    color: #334155; 
    border: 1px solid #cbd5e1;
}
.run-weekend { 
    background-color: #fef08a; /* สีเหลืองอ่อน */
    color: #854d0e; 
    border: 1px solid #fde047;
}
.run-special { 
    background-color: #fecaca; /* สีแดงอ่อน */
    color: #991b1b; 
    border: 1px solid #fca5a5;
}
.run-everyday {
    /* ปกติอาจจะไม่ต้องโชว์ หรือใช้สีจางๆ */
    display: none; 
}

/* Dark Mode Support */
[data-theme="dark"] .run-weekday { background: #334155; color: #cbd5e1; border-color: #475569; }
[data-theme="dark"] .run-weekend { background: #422006; color: #fde047; border-color: #713f12; }

/* --- [UPDATED] Feeder Train Style (Theme: Electric Purple - High Contrast) --- */

/* 1. สีหัวตาราง (Header) - ปรับให้เข้มขึ้น */
.bg-feeder { 
    /* พื้นหลังสีม่วงกลางๆ ไม่ซีดแล้ว */
    background-color: #b88fff !important; 
    /* เส้นบนสีม่วงสว่างเพื่อให้ดูมีมิติ */
    border-top: 4px solid #a855f7;      
    /* ตัวหนังสือบังคับสีขาวให้เด่นชัด */
    color: #ffffff !important;          
}
/* เพิ่ม Effect ตอนเอาเมาส์ชี้ (Optional) */
.bg-feeder:hover {
    background-color: #6d28d9 !important; /* เข้มขึ้นอีกนิดตอนชี้ */
}


/* 2. สีป้ายกำกับ (Badge) - ปรับให้เข้าชุดกัน */
.run-feeder { 
    background-color: #8b5cf6; 
    color: #ffffff; 
    border: 1px solid #7c3aed;
    font-weight: 600; /* เพิ่มความหนาให้ป้ายนิดนึง */
}


/* --- Dark Mode Support --- */
/* ในโหมดมืด อาจจะลดความสว่างลงนิดหน่อยเพื่อไม่ให้แสบตา */
[data-theme="dark"] .bg-feeder {
    background-color: #8b5cf6 !important; 
    border-top: 4px solid #d8b4fe;      
    color: #ffffff !important;          
}
[data-theme="dark"] .run-feeder {
    background-color: #8b5cf6; 
    color: #ffffff; 
    border-color: #a78bfa;
}

/* =========================================
   MOBILE COMPACT V4 (Ratio 1:3 - แก้ปัญหาสถานีกว้างเกิน)
   ========================================= */
@media (max-width: 576px) {
    
    /* 1. บังคับ "เซลล์หัวตาราง" และ "เซลล์สถานี" ให้กว้างแค่ 90px เท่านั้น */
    #timetable thead th:first-child,
    #timetable tbody th {
        width: 120px !important;
        min-width: 120px !important;
        max-width: 120px !important;
        overflow: hidden;
    }

    /* 2. จัดการเนื้อหาข้างใน (ชื่อสถานี) */
    .station-cell {
        width: 100% !important;        /* ให้เต็มความกว้างของแม่ (90px) */
        min-width: 0 !important;       /* รีเซ็ตค่าเดิม */
        
        display: flex !important;      
        flex-direction: column;        
        justify-content: center;
    }
    
    /* ชื่อสถานี */
    .station-name {
        font-size: 0.8rem !important;  
        white-space: nowrap !important; 
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        margin-bottom: 0 !important;
    }
    
    /* เลข กม. */
    .station-km {
        font-size: 0.55rem !important;
        color: #94a3b8;
        margin-top: -1px !important;
    }

    /* [เสริม] ย่อขนาดป้าย Badge ในช่องสถานีให้เล็กลง (จะได้ไม่ดันบรรทัดสูง) */
    .station-meta .badge-base {
        font-size: 0.6rem !important; /* ลดขนาดตัวหนังสือในป้าย */
        padding: 0 3px !important;    /* ลดขอบป้าย */
        margin-right: 1px !important;
        line-height: 1 !important;
        display: inline-block;        /* ให้เรียงต่อกันแนวนอน */
    }

    /* จัดระยะห่างระหว่างชื่อสถานีกับป้าย */
    .station-info {
        display: flex;
        flex-direction: column;       /* ชื่ออยู่บน ป้ายอยู่ล่าง */
        gap: 1px;                     /* ช่องว่างระหว่างชื่อกับป้าย */
    }

    /* 3. จัดการช่องเวลา */
    .th-content {
        min-width: 35px !important;    /* ช่องเวลาขนาดเล็ก */
    }
    
    /* 4. บีบความสูงแถว */
    #timetable th, #timetable td {
        padding: 2px 2px !important;   
        height: 28px !important;       
    }

    /* 5. ลดขนาดตัวอักษรส่วนอื่นๆ */
    .train-num { font-size: 1.2 !important; margin-bottom: 0; }
    .train-name { font-size: 0.5rem !important; opacity: 0.8; }
    .badge-run-day { font-size: 0.5rem !important; transform: scale(0.9); }
    .time-cell { font-size: 1.0rem !important; }
	
	/* เพิ่มใน @media (max-width: 576px) { ... } */
    
    /* --- FORCE SHOW FOOTER (วางล่างสุดของไฟล์) --- */
	.footer-bar {
		display: block !important;       /* บังคับแสดง */
		visibility: visible !important;  /* บังคับมองเห็น */
		opacity: 1 !important;           /* ไม่โปร่งใส */
		position: fixed !important;      /* ยึดติดจอ */
		bottom: 0 !important;            /* ชิดขอบล่าง */
		left: 0 !important;
		width: 100% !important;
		z-index: 99999 !important;       /* อยู่บนสุดทับทุกอย่าง */
		background-color: #ffffff !important; /* พื้นหลังสีขาว */
		border-top: 1px solid #ccc !important;
		height: auto !important;
		min-height: 40px !important;     /* กันเหนียวว่าความสูงไม่เป็น 0 */
	}

	/* ถ้า Footer ซ้อนทับปุ่ม PDF หรือปุ่มอื่นๆ ให้ขยับปุ่มหนี */
	.controls-bar {
		z-index: 100000 !important; /* ปุ่มควบคุมอยู่บน Footer อีกที */
	}
	
	/* [NEW] เพิ่มพื้นที่ว่างด้านล่างของหน้าเว็บ เพื่อไม่ให้ Footer บังเนื้อหา */
    body {
        /* เผื่อไว้สัก 80px (หรือมากกว่าความสูงของ Footer) */
        padding-bottom: 100px !important; 
    }

    /* หรือถ้าตารางอยู่ในกล่อง scroll แยก ให้เพิ่มตรงนี้ด้วย */
    .table-responsive {
        margin-bottom: 100px !important;
    }
	
	.spacer-row { 
        display: table-row; /* แสดงผลเป็นแถวตาราง */
    }
    
    .spacer-row td {
        /* กำหนดความสูงพื้นที่ว่าง (ปรับเลขนี้ได้ถ้ายังดันไม่พอ) */
        height: 120px !important; 
        
        /* (Optional) ใส่สีจางๆ เพื่อเทสว่าแถวอยู่ตรงไหน (เทสเสร็จลบออกได้) */
        /* background-color: rgba(255,0,0,0.1) !important; */
    }
	
	/* [NEW] ขยายแถวสุดท้ายของตาราง (สถานีปลายทาง) ให้สูงขึ้นเพื่อหนี Footer */
    #timetable tbody tr:last-child td,
    #timetable tbody tr:last-child th {
        padding-bottom: 5px !important; /* ดันความสูงลงไปข้างล่าง */
        vertical-align: top !important;   /* ให้ตัวหนังสือลอยอยู่ข้างบน (ไม่จมหาย) */
        border-bottom: none !important;   /* ซ่อนเส้นขอบล่างถ้าต้องการ */
    }
}

/* --- Spacer Row Logic (แถวกันชน Footer) --- */

/* 1. สไตล์พื้นฐาน: ไม่มีเส้นขอบ ไม่สีพื้นหลัง */
.spacer-row td {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
}

/* 2. ปกติ (Desktop): ซ่อนไว้ไม่ต้องโชว์ */
.spacer-row { 
    display: none; 
}

/* =========================================
   SEASONAL THEMES (ธีมเทศกาล)
   ========================================= */

/* --- 1. Valentine's Day Theme (ธีมวาเลนไทน์) --- */
body.theme-valentine {
    background-color: #fff0f6 !important; /* พื้นชมพูอ่อน */
}
/* เปลี่ยนสีหัวตารางหลัก */
body.theme-valentine .srt-header, 
body.theme-valentine .srt-navbar {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%) !important;
    border-bottom: 2px solid #ff758c !important;
}
body.theme-valentine .srt-brand-text {
    color: #d63384 !important; /* ตัวหนังสือสีชมพูเข้ม */
}

/* --- 2. Christmas Theme (ธีมคริสต์มาส) --- */
body.theme-christmas {
    background-color: #f0fdf4 !important; /* พื้นเขียวมิ้นท์จางๆ */
}
body.theme-christmas .srt-header,
body.theme-christmas .srt-navbar {
    background: linear-gradient(to right, #166534, #15803d) !important; /* เขียวเข้ม */
    border-bottom: 2px solid #dc2626 !important; /* เส้นขอบแดง */
}
body.theme-christmas .srt-brand-text {
    color: #fef2f2 !important; /* ตัวหนังสือขาว/แดง */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* --- Animation Class (สำหรับของตกแต่งร่วงลงมา) --- */
.falling-item {
    position: fixed;
    top: -10%;
    z-index: 99999;
    user-select: none;
    pointer-events: none; /* เพื่อให้คลิกทะลุได้ ไม่บังปุ่ม */
    animation-name: fall-down;
    animation-timing-function: linear;
}

@keyframes fall-down {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(110vh) rotate(360deg); opacity: 0; }
}

/* --- 3. New Year Theme (ธีมปีใหม่) --- */
body.theme-newyear {
    background-color: #f0f9ff !important; /* พื้นฟ้าสว่างสดใส */
}
body.theme-newyear .srt-header,
body.theme-newyear .srt-navbar {
    background: linear-gradient(to right, #1d4ed8, #2563eb) !important; /* น้ำเงินสดใส */
    border-bottom: 2px solid #fbbf24 !important; /* เส้นขอบทอง */
}

/* --- 4. Songkran Theme (ธีมสงกรานต์) --- */
body.theme-songkran {
    background-color: #fdf2f8 !important; /* ชมพูอมม่วงสว่างๆ */
}
body.theme-songkran .srt-header,
body.theme-songkran .srt-navbar {
    background: linear-gradient(to right, #0ea5e9, #6366f1) !important; /* ฟ้าอมม่วง (สีน้ำ) */
    border-bottom: 2px solid #f472b6 !important; /* เส้นขอบดอกไม้ */
}


/* --- FIX W3C COLOR CONTRAST --- */

/* 1. เปลี่ยนตัวหนังสือเป็นสีดำ สำหรับพื้นหลังสีอ่อน */
.run-ordinary,      /* รถธรรมดา */
.run-commuter,      /* รถชานเมือง */
.conn-yell,         /* รถไฟฟ้าสายสีเหลือง */
.conn-pink,         /* รถไฟฟ้าสายสีชมพู */
.conn-arl,          /* ARL (บางทีสีแดงอ่อน) */
.badge-halt,        /* ที่หยุดรถ */
.btn-warning        /* ปุ่มสีเหลือง */
{
    color: #000000 !important; /* บังคับตัวหนังสือสีดำ */
    font-weight: 600 !important; /* เพิ่มความหนาช่วยให้อ่านง่ายขึ้น */
}

/* 2. ปรับสีเทาให้เข้มขึ้น (ให้ผ่านเกณฑ์ 4.5:1) */
.station-km {
    color: #475569 !important; /* เปลี่ยนจากเทาอ่อน เป็นเทาเข้ม (Slate-600) */
}

.footer-rules li, 
.footer-credit,
#lbl-loading {
    color: #334155 !important; /* เทาเข้มเกือบดำ (Slate-700) */
}

/* ช่อง Search Placeholder บางทีจางไป */
::placeholder {
    color: #64748b !important;
    opacity: 1; /* Firefox ชอบปรับจางเอง ต้องบังคับ */
}

/* 3. ลิงก์และข้อความสีหลัก */
.text-primary, 
.srt-brand-text {
    color: #FFFFFF !important; /* ฟ้าเข้ม (Sky-900) หรือน้ำเงินเข้ม */
}

/* ลิงก์ขบวนรถตอนเอาเมาส์ชี้ */
.train-link:hover {
    color: #be123c !important; /* แดงเข้ม (Rose-700) แทนแดงสด */
}

/* --- ONLINE USER COUNTER --- */
.online-counter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 15px; /* เว้นระยะห่างจากปุ่มอื่นๆ */
    font-size: 0.85rem;
    color: #0f172a; /* สีเทาเข้ม */
    font-weight: 600;
    background: rgba(255, 255, 255, 0.8);
    padding: 2px 10px;
    border-radius: 20px;
    border: 1px solid #cbd5e1;
}

/* --- ONLINE USER COUNTER (แบบใหม่ อยู่บนแถบเมนู) --- */
.online-counter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    /* ลบพวก position: fixed, bottom, right ออกให้หมดครับ */
    /* ตกแต่งให้ดูเป็นป้ายเล็กๆ */
    background-color: #f1f5f9; /* พื้นหลังสีเทาจางๆ */
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

/* จุดสีเขียวกระพริบ (เหมือนเดิม) */
.dot-online {
    width: 8px;
    height: 8px;
    background-color: #22c55e;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    animation: pulse-green 2s infinite;
}

/* ลบ @media query ของเดิมทิ้งไปได้เลยครับ เพราะตอนนี้มันจะไหลตาม Flow ปกติ ไม่บังจอแล้ว */