
        body {
            margin: 0;
            font-family: 'K2D', sans-serif;
        }

        /* Sidebar */
        #sidebar {
            position: fixed;
            top: 0;
            left: 0;
            width: 310px;
            height: 100vh;
            background: #e67e22;
            border-right: 1px solid #ddd;
            overflow-y: auto;
            transition: width 0.3s ease;
            z-index: 1000;
            display: flex;
            flex-direction: column;
            align-items: center;
        }


        #sidebar.collapsed {
            max-width: 80px;
        }

        #sidebar .header {
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 15px;
            background: #d35400;
            width: 100%;
            cursor: pointer;

        }

        #sidebar .header h1 {
            font-size: 18px;
            margin: 0;
            white-space: nowrap;
        }

        .button-container {
            display: flex;
            justify-content: center;
            /* จัดให้อยู่กึ่งกลางแนวนอน */
            flex-wrap: wrap;
            /* ให้ปุ่มขึ้นบรรทัดใหม่ถ้าพื้นที่ไม่พอ */
            margin-top: 20px;
            /* เพิ่มระยะห่างด้านบนถ้าต้องการ */
        }




        /* Container ปุ่ม */
        .button-container {
            display: flex;
            flex-wrap: wrap;
            gap: 5px;
            transition: all 0.3s ease;
        }

        /* Sidebar ขยาย (ปกติ) */
        #sidebar:not(.collapsed) .button-container {
            flex-direction: row;
            /* แนวนอน */
            justify-content: flex-start;
            /* ชิดซ้าย */
        }

        /* Sidebar ย่อ */
        #sidebar.collapsed .button-container {
            flex-direction: column;
            /* แนวตั้ง */
            justify-content: center;
            /* กึ่งกลางแนวนอน */
            align-items: center;
            /* กึ่งกลางแนวตั้ง */
        }


        #sidebar button#plotSymbolsBtn,
        #sidebar button#plotPrintBtn,
        #sidebar button#navigationBtn,
        #sidebar button#aboutBtn {
            margin: 5px 0;
            /* เว้นระยะด้านบน-ล่าง */
            padding: 8px 12px;
            background: #d35400;
            border: none;
            color: white;
            font-weight: bold;
            cursor: pointer;
            border-radius: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            font-size: 16px;
            width: auto;
            /* ขนาดปุ่มตามเนื้อหา */
            min-width: 40px;
            /* ขนาดขั้นต่ำ */
            white-space: nowrap;
        }


        #plotSymbolsBtn:hover,
        #plotPrintBtn:hover,
        #navigationBtn:hover,
        #aboutBtn:hover {
            background: #e67e22;
        }

        /* Legend */
        #plotLegend {
            font-family: 'K2D', sans-serif;
            background-color: white;
            margin: 10px;
            padding: 10px;
            border: 1px solid #ccc;
            border-radius: 4px;
            /* แก้ไขเพื่อซ่อนแบบนุ่มนวล */
            visibility: hidden;
            opacity: 0;
            transition: opacity 0.3s ease;
            position: relative;
            max-height: 600px;
            overflow-y: auto;
        }

        #plotLegend.show {
            visibility: visible;
            opacity: 1;
        }

        /* สัญลักษณ์ใน legend */
        .plot-item {
            display: flex;
            align-items: center;
            margin-bottom: 6px;
            cursor: pointer;
        }

        .plot-item div {
            width: 16px;
            height: 16px;
            border-radius: 50%;
            border: 1px solid white;
            margin-right: 8px;
        }

        /* ตารางใน print */
        table {
            border-collapse: collapse;
            width: 100%;
        }

        th,
        td {
            border: 1px solid #ddd;
            padding: 8px;
            font-size: 14px;
        }

        th {
            background-color: #2980b9;
            color: white;
            text-align: left;
        }

        /* ปุ่มพิมพ์ใน legend */
        #plotLegend button.print-btn {
            background: #2980b9;
            color: white;
            padding: 8px 16px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            margin-top: 10px;
            font-size: 16px;
        }

        #plotLegend button.print-btn:hover {
            background: #3498db;
        }

        /* แผนที่เต็มหน้าจอ */
        #map {
            position: fixed;
            top: 0;
            left: 310px;
            right: 0;
            bottom: 0;
            transition: left 0.3s ease;
        }

        #sidebar.collapsed+#map {
            left: 80px;
        }

        .sidebar .toggle-btn {
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 15px;
            cursor: pointer;
            background: #d35400;
            width: 100%;
        }

        #sidebar .header {
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 15px;
            cursor: pointer;
            background: #d35400;
            width: 100%;
        }

        #sidebar .header img {
            height: 50px;
            border-radius: 50%;
            transition: transform 0.5s ease;
        }

        #sidebar:not(.collapsed) .header img {
            transform: rotate(360deg);
        }

        /* ไฮไลต์ marker ที่เลือก */
        .selected-marker {
            border: 3px solid #2980b9 !important;
            box-sizing: border-box;
        }

        /* Bottom Expandable Menu */
        #bottomMenu {
            position: fixed;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 95%;
            max-width: 600px;
            background: #d35400;
            border-radius: 12px 12px 0 0;
            box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.2);
            z-index: 1100;
            transition: max-height 0.3s ease;
            overflow: hidden;
        }

        #bottomMenu.collapsed .menu-content {
            max-height: 0;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s ease, max-height 0.3s ease;
        }

        #bottomMenu .menu-toggle {
            text-align: center;
            padding: 8px;
            cursor: pointer;
            color: white;
            font-size: 18px;
            background: #e67e22;
            border-top-left-radius: 12px;
            border-top-right-radius: 12px;
        }

        #bottomMenu .menu-content {
            display: flex;
            flex-wrap: wrap;
            justify-content: space-around;
            padding: 10px;
            gap: 10px;
            transition: all 0.3s ease;
        }

        .bottom-btn {
            font-family: 'K2D', sans-serif;
            flex: 1 1 45%;
            padding: 10px;
            background: #ffffff;
            border: none;
            color: #d35400;
            font-weight: bold;
            font-size: 14px;
            border-radius: 8px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        }

        .bottom-btn:hover {
            background: #f0f0f0;
        }

        /* เนื้อหาพิมพ์ใต้เมนูด้านล่าง */
        #printContentWrapper {
            padding: 15px;
            background: white;
            max-width: 95%;
            margin: 10px auto;
            border-radius: 8px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
            font-family: 'K2D', sans-serif;
            font-size: 14px;
            line-height: 1.6;
            overflow: auto;
        }

        #printContentWrapper table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 10px;
        }

        #printContentWrapper th,
        #printContentWrapper td {
            border: 1px solid #ddd;
            padding: 8px;
        }

        #printContentWrapper th {
            background-color: #2980b9;
            color: white;
            text-align: left;
        }

        #printContentWrapper .print-btn {
            background: #2980b9;
            color: white;
            padding: 8px 16px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            margin-top: 10px;
        }

        #printContentWrapper .print-btn:hover {
            background: #3498db;
        }

        /* ปุ่ม locate ให้เป็นสไตล์เดียวกับปุ่ม Leaflet */
        .leaflet-control-locate {
            background-color: #fff;
            border: 2px solid rgba(0, 0, 0, 0.2);
            border-radius: 4px;
            box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4);
            width: 30px;
            height: 30px;
            line-height: 26px;
            text-align: center;
            font-size: 18px;
            cursor: pointer;
        }

        .leaflet-control-locate:hover {
            background-color: #f4f4f4;
        }
