* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    /* font-family: -apple-system, BlinkMacSystemFont, sans-serif; */
    font-family: 'Mali', cursive;
}

.light {
    font-weight: 200;
    /* ExtraLight */
}

/* เพิ่มพื้นที่ด้านล่างเพื่อหลีกเลี่ยงการซ้อนทับ */
body {
    padding-bottom: 70px;
}

/* ===== CONTENT ===== */
.content {
    height: 100%;
    /* ใช้ขนาดจอทั้งหมด ลบด้วยความสูงของแท็บ */
    padding: 16px;
    overflow-y: auto;
    background: #ffffff;
    /* Set background color to white */
}

/* ===== PAGE ===== */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* ===== TAB BAR ===== */
.tabbar {
    display: flex;
    border-top: 1px solid #ddd;
    background: #fff;
    font-family: inherit;
    /* Ensure it inherits from body */
}

:root {
    --theme-color: #27c607;
    --theme-color-hover: #1f9c06;
    --inactive-color: #ccc;
    --text-primary: #555555;
    /* สีข้อความหลัก */
    --text-secondary: #666666;
    /* สีข้อความรอง */
    --text-highlight: #ff5722;
    /* สีข้อความเน้น */
    --text-muted: #999999;
    /* สีข้อความจาง */
}

.tabbar button {
    flex: 1;
    border: none;
    background: none;
    font-size: 16px;
    /* เพิ่มขนาดตัวอักษรให้ชัดเจนขึ้น */
    padding: 10px 0;
    /* เพิ่มพื้นที่ภายในปุ่ม */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--inactive-color);
    fill: var(--inactive-color);
    transition: color 0.3s, fill 0.3s;
    font-family: inherit;
    /* Removed explicit font-family */
}

.tabbar button.active {
    color: var(--theme-color);
    fill: var(--theme-color);
    font-weight: bold;
}

.tabbar .icon {
    font-size: 20px;
    margin-bottom: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.tabbar .text {
    font-size: 14px;
    font-family: inherit;
    /* Removed explicit font-family */
}

/* ตั้งค่าแท็บให้คงที่ที่ด้านล่าง */
.tabs {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    z-index: 100;
}

button {
    -webkit-tap-highlight-color: transparent;
    /* ปิดเอฟเฟกต์ไฮไลต์บนมือถือ */
}