/* ============================================================
   UI-KIT  ·  Shared consistency layer for Mali's Universe
   ------------------------------------------------------------
   ONE source of truth for the elements that drift between the
   sites — buttons (size, shape, shadow, weight), the pixel
   shadow, and corner radii. Loaded LAST on every app/marketing
   page (Chamiz hub, MaliBills, MaliTrip) so it wins by order.

   Arcade game pages keep their own retro look on purpose.
   ============================================================ */

/* ---- Normalised tokens (kept identical across the three sites) ----
   Shadows are soft & layered for a premium feel. Loaded LAST, so these
   win over each site's older boxy `4px 4px 0` token values. */
:root {
  --shadow-pixel:    0 8px 22px -10px rgba(75, 44, 28, 0.20);
  --shadow-pixel-lg: 0 22px 50px -20px rgba(75, 44, 28, 0.26);
  --shadow-soft:     0 10px 28px -10px rgba(45, 28, 20, 0.10);
  --shadow-lift:     0 18px 42px -16px rgba(45, 28, 20, 0.16);
  --shadow-card:     0 12px 32px -16px rgba(75, 44, 28, 0.20);
  --shadow-card-lg:  0 26px 58px -26px rgba(75, 44, 28, 0.28);
  --radius-sm: 14px;
  --radius-md: 18px;
  --radius-lg: 24px;
}

/* ============================================================
   PRIMARY BUTTON  —  one warm red "candy" pill everywhere
   Targets each site's primary CTA class.
   ============================================================ */
.btn,                 /* Chamiz */
.btn-primary,         /* MaliTrip */
.hero-btn.primary {   /* MaliBills */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 28px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(180deg, #d85151, #b73535);
  color: #fff;
  font-family: var(--font-body, "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-size: 15px;
  font-weight: 800 !important;
  letter-spacing: -0.01em;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 24px -8px rgba(183, 53, 53, 0.5), 0 2px 5px rgba(127, 32, 32, 0.22);
  transition: transform 180ms var(--ease, cubic-bezier(0.22, 1, 0.36, 1)),
              box-shadow 180ms var(--ease, cubic-bezier(0.22, 1, 0.36, 1)),
              filter 180ms ease;
}
.btn:hover,
.btn-primary:hover,
.hero-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -8px rgba(183, 53, 53, 0.55), 0 3px 8px rgba(127, 32, 32, 0.26);
  filter: brightness(1.04);
}
.btn:active,
.btn-primary:active,
.hero-btn.primary:active {
  transform: translateY(0);
  box-shadow: 0 6px 16px -6px rgba(183, 53, 53, 0.4);
}

/* ============================================================
   SECONDARY BUTTON  —  one calm outlined pill everywhere
   ============================================================ */
.btn-secondary,         /* MaliTrip */
.hero-btn.secondary {   /* MaliBills */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 24px;
  border: 2px solid var(--accent-line, rgba(183, 53, 53, 0.26));
  border-radius: 999px;
  background: var(--surface, #fffdf8);
  color: var(--accent, #b73535);
  font-family: var(--font-body, "Inter", sans-serif);
  font-size: 15px;
  font-weight: 800 !important;
  letter-spacing: -0.01em;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  box-shadow: none;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}
.btn-secondary:hover,
.hero-btn.secondary:hover {
  transform: translateY(-1px);
  border-color: var(--accent, #b73535);
  background: var(--accent-soft, rgba(183, 53, 53, 0.08));
}

/* ============================================================
   LINE BUTTON  —  green stays green, but matches the pill shape
   ============================================================ */
.btn-line,
.hero-btn.line-btn {
  min-height: 50px;
  border-radius: 999px;
  font-weight: 900 !important;
}

/* ============================================================
   GLOBAL NAV MENU (.gnav)  —  identical on every page/site
   Mali ▾ · Arcade · Contact · Login/MyProfile ▾
   Higher-specificity selectors so it wins over each site's
   own nav-link styles regardless of load order.
   ============================================================ */
ul.gnav {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 22px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.gnav .gnav-item { position: relative; display: flex; align-items: center; }

.gnav .gnav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-body, "Inter", sans-serif);
  font-size: 14px;
  font-weight: 700;
  color: var(--subtle, #77716a);
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  min-height: 0;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  box-shadow: none;
  transition: color 160ms ease;
}
.gnav .gnav-link:hover,
.gnav .gnav-has-dd:hover .gnav-link,
.gnav .gnav-has-dd:focus-within .gnav-link,
.gnav .gnav-has-dd.open .gnav-link { color: var(--text, #1d1d1f); background: none; transform: none; }

.gnav .gnav-caret { font-size: 10px; transition: transform 160ms ease; }
.gnav .gnav-has-dd:hover .gnav-caret,
.gnav .gnav-has-dd:focus-within .gnav-caret,
.gnav .gnav-has-dd.open .gnav-caret { transform: rotate(180deg); }

.gnav .gnav-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 170px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
  background: var(--surface, #fffdf8);
  border: 1px solid var(--border-soft, rgba(29, 29, 31, 0.14));
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(45, 28, 20, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms;
  z-index: 200;
}
.gnav .gnav-menu.gnav-menu-right { left: auto; right: 0; }
.gnav .gnav-has-dd:hover .gnav-menu,
.gnav .gnav-has-dd:focus-within .gnav-menu,
.gnav .gnav-has-dd.open .gnav-menu { opacity: 1; visibility: visible; transform: translateY(0); }

.gnav .gnav-menu a {
  display: block;
  min-height: 0;
  font-family: var(--font-body, "Inter", sans-serif);
  font-size: 14px;
  font-weight: 700;
  color: var(--subtle, #77716a);
  padding: 9px 12px;
  border: none;
  border-radius: 9px;
  background: none;
  box-shadow: none;
  text-decoration: none;
  white-space: nowrap;
  transition: background 140ms ease, color 140ms ease;
}
.gnav .gnav-menu a:hover { color: var(--text, #1d1d1f); background: var(--surface-soft, #fff4df); transform: none; }

/* Inside MaliBills' mobile hamburger panel: stack the menu and show the
   dropdown links inline (no floating sub-menus on a touch panel). */
@media (max-width: 900px) {
  /* Clean, stacked mobile menu: every item full-width and centered,
     the "Mali" dropdown becomes a small section header above its links. */
  .nav-right ul.gnav {
    flex-direction: column;
    width: 100%;
    align-items: stretch;
    gap: 2px;
  }
  .nav-right .gnav .gnav-item {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .nav-right .gnav .gnav-link {
    justify-content: center;
    width: 100%;
    padding: 12px 10px;
    border-radius: 12px;
    font-size: 15px;
    transition: background 150ms var(--ease, ease), color 150ms var(--ease, ease);
  }
  .nav-right .gnav .gnav-link:hover {
    background: var(--surface-soft, #fff4df);
    color: var(--text, #1d1d1f);
  }
  /* "Mali" toggle → quiet section label (it just groups the links here) */
  .nav-right .gnav .gnav-has-dd > .gnav-toggle {
    padding: 10px 10px 2px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--subtle, #77716a);
    cursor: default;
    pointer-events: none;
  }
  .nav-right .gnav .gnav-has-dd > .gnav-toggle:hover { background: transparent; }
  .nav-right .gnav .gnav-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: transparent;
    width: 100%;
    min-width: 0;
    padding: 0 0 6px;
    gap: 0;
    align-items: stretch;
  }
  .nav-right .gnav .gnav-menu a {
    text-align: center;
    width: 100%;
    padding: 11px 10px;
    font-size: 15px;
    font-weight: 700;
    color: var(--subtle, #77716a);
    border-radius: 12px;
    transition: background 150ms var(--ease, ease), color 150ms var(--ease, ease);
  }
  .nav-right .gnav .gnav-menu a:hover {
    background: var(--surface-soft, #fff4df);
    color: var(--accent, #b73535);
  }
  .nav-right .gnav .gnav-caret { display: none; }
  /* language pill spans the panel for a tidy, tappable footer */
  .nav-right .menu-language-switch { width: 100%; margin-top: 4px; }
  .nav-right .menu-language-switch .single-lang-toggle { width: 100%; }
}

/* ============================================================
   PREMIUM POLISH  ·  one smooth, consistent feel across every
   page (Chamiz hub, MaliBills, MaliTrip). Additive only — no
   layout changes, just motion, focus, scroll & form refinement.
   ============================================================ */

/* Smooth in-page scrolling that clears the sticky nav */
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h, 64px) + 14px);
}

/* Crisper type everywhere */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Branded text selection */
::selection { background: var(--accent-soft, rgba(183, 53, 53, 0.18)); color: var(--text, #1d1d1f); }

/* Subtle branded scrollbar (the small touches that read "premium") */
* { scrollbar-width: thin; scrollbar-color: rgba(120, 84, 58, 0.3) transparent; }
*::-webkit-scrollbar { width: 11px; height: 11px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: rgba(120, 84, 58, 0.28);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover {
  background: var(--accent-line, rgba(183, 53, 53, 0.4));
  background-clip: padding-box;
}

/* Consistent, accessible keyboard-focus ring (mouse clicks unaffected) */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2.5px solid var(--accent, #b73535);
  outline-offset: 2px;
  border-radius: 10px;
}

/* Smooth links + a unified, premium feel for form fields site-wide.
   Page-specific focus styles (higher specificity) still win where set. */
a { transition: color 160ms var(--ease, ease); }

input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]),
select,
textarea {
  transition: border-color 160ms var(--ease, ease),
              box-shadow 160ms var(--ease, ease),
              background-color 160ms var(--ease, ease);
}
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 0 3px var(--accent-soft, rgba(183, 53, 53, 0.12));
}

/* Gentle, consistent press feedback on any pill/round control */
button, .btn, .btn-primary, .btn-secondary, .hero-btn, [role="button"] { -webkit-tap-highlight-color: transparent; }

/* Thai: buttons are mostly <a class="...btn..."> anchors with an explicit
   font-family, so they don't inherit the SukhumvitSet body swap. Force the
   Thai font on every button-like control + nav link so TH stays consistent.
   (SukhumvitSet @font-face is declared in each site's own stylesheet.) */
html[lang="th"] button,
html[lang="th"] [class*="btn"],
html[lang="th"] .gnav-link,
html[lang="th"] .single-lang-toggle,
html[lang="th"] input,
html[lang="th"] select,
html[lang="th"] textarea {
  font-family: "SukhumvitSet", "Sarabun", "Noto Sans Thai", system-ui, sans-serif;
}

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   SIDEBAR NAV  ·  one slide-in sidebar on every page (gnav.js)
   Warm-brand take on the "ES6 sidebar": rounded glassy panel,
   icon + label rows, active highlight, expandable Mali group.
   Old top-menu items are hidden once the sidebar is built
   (html.ms-ready); the page keeps only its logo + a hamburger.
   ============================================================ */
html.ms-ready nav ul.gnav,
html.ms-ready .gnav,
html.ms-ready .language-switch,
html.ms-ready .menu-language-switch,
html.ms-ready .menu-toggle,
html.ms-ready .nav-right,
html.ms-ready .desktop-nav { display: none !important; }

/* Hamburger injected into each page's top bar */
.ms-burger {
  margin-left: auto;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border-radius: 13px;
  border: 1.5px solid var(--card-border, rgba(120, 84, 58, 0.16));
  background: var(--surface, #fffdf8);
  color: var(--text, #1d1d1f);
  cursor: pointer;
  transition: background 150ms var(--ease, ease), border-color 150ms var(--ease, ease), transform 150ms var(--ease, ease);
}
.ms-burger:hover { background: var(--surface-soft, #fff4df); border-color: var(--accent-line, rgba(183, 53, 53, 0.26)); }
.ms-burger:active { transform: scale(0.94); }
.ms-burger svg { width: 22px; height: 22px; }

/* Standalone language toggle pinned top-right. Mobile-only: on desktop the
   hamburger + sidebar already carry the language toggle, so this stays hidden
   and is revealed in the ≤700px block (where the burger is hidden). */
.ms-toplang {
  margin-left: auto;              /* push the control to the right edge */
  flex: 0 0 auto;
  display: none;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 13px;
  border-radius: 13px;
  border: 1.5px solid var(--card-border, rgba(120, 84, 58, 0.16));
  background: var(--surface, #fffdf8);
  color: var(--text, #1d1d1f);
  font: 700 13px/1 inherit;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: none;
  transition: background 150ms var(--ease, ease), border-color 150ms var(--ease, ease), transform 150ms var(--ease, ease);
}
.ms-toplang:hover { background: var(--surface-soft, #fff4df); border-color: var(--accent-line, rgba(183, 53, 53, 0.26)); }
.ms-toplang:active { transform: scale(0.94); }
.ms-toplang svg { width: 18px; height: 18px; }
.ms-toplang-code { font-weight: 800; }

/* Neutralize each site's global <button> styling — esp. MaliBills' candy red
   bottom-shadow / gradient (`button { box-shadow: 0 4px 0 #7f2020 }`) — bleeding
   onto the sidebar's own buttons (burger, close, group toggle, language). */
.ms-burger,
.ms-burger:hover,
.ms-burger:active,
.ms-burger:focus,
.ms-sidebar button,
.ms-sidebar button:hover,
.ms-sidebar button:active,
.ms-sidebar button:focus {
  box-shadow: none;
  text-shadow: none;
  filter: none;
}

/* Dim overlay behind the sidebar */
.ms-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(45, 28, 20, 0.34);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 300ms var(--ease, ease);
}
html.ms-open .ms-overlay { opacity: 1; }

/* The floating glassy panel */
.ms-sidebar {
  position: fixed;
  top: 12px;
  right: 12px;
  bottom: 12px;
  width: min(312px, 86vw);
  z-index: 1201;
  display: flex;
  flex-direction: column;
  padding: 14px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(var(--glass-rgb), 0.94), rgba(var(--glass-rgb), 0.9));
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  backdrop-filter: blur(22px) saturate(1.3);
  border: 1.5px solid var(--card-border, rgba(120, 84, 58, 0.18));
  box-shadow: 0 40px 90px -34px rgba(75, 44, 28, 0.5);
  transform: translateX(calc(100% + 20px));
  transition: transform 360ms var(--ease, cubic-bezier(0.22, 1, 0.36, 1));
  overflow-y: auto;
  /* Pin one font for BOTH languages (TH is the standard) so EN labels don't
     shift size when --font-body swaps Inter <-> SukhumvitSet between locales. */
  font-family: "SukhumvitSet", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
html.ms-open .ms-sidebar { transform: translateX(0); }

/* Header: brand + close */
.ms-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 6px 2px; }
.ms-brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 20px; letter-spacing: -0.04em;
  color: var(--text, #1d1d1f); text-decoration: none;
}
.ms-brand b { color: #f4a261; font-weight: 800; }
.ms-brand-ic { width: 26px; height: 26px; display: inline-grid; place-items: center; }
.ms-brand-ic svg { width: 26px; height: 26px; }
.ms-x {
  width: 38px; height: 38px; flex: 0 0 auto;
  display: inline-grid; place-items: center;
  border: none; border-radius: 11px; background: transparent;
  color: var(--subtle, #77716a); cursor: pointer;
  transition: background 150ms var(--ease, ease), color 150ms var(--ease, ease);
}
.ms-x:hover { background: var(--surface-soft, #fff4df); color: var(--text, #1d1d1f); }
.ms-x svg { width: 20px; height: 20px; }

.ms-divider { height: 1px; background: var(--card-border, rgba(120, 84, 58, 0.18)); margin: 10px 4px 12px; }

/* Nav rows */
.ms-nav { display: flex; flex-direction: column; align-items: stretch; gap: 3px; flex: 1 1 auto; }
.ms-group { width: 100%; }
.ms-item {
  display: flex; align-items: center; gap: 13px; width: 100%;
  padding: 13px 14px; border-radius: 15px;
  background: transparent; border: none; cursor: pointer;
  font-family: inherit; font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em;
  color: var(--text, #1d1d1f); text-decoration: none; text-align: left;
  transition: background 150ms var(--ease, ease), color 150ms var(--ease, ease);
}
.ms-item:hover { background: var(--surface-soft, #fff4df); }
.ms-item.active { background: var(--accent-soft, rgba(183, 53, 53, 0.12)); color: var(--accent, #b73535); }
.ms-ic { flex: 0 0 auto; width: 24px; height: 24px; display: inline-grid; place-items: center; color: currentColor; }
.ms-ic svg { width: 22px; height: 22px; }
.ms-label { flex: 1 1 auto; }
.ms-caret { flex: 0 0 auto; width: 18px; height: 18px; color: var(--subtle, #77716a); transition: transform 220ms var(--ease, ease); }
.ms-caret svg { width: 18px; height: 18px; }
.ms-group.open > .ms-grouptoggle { color: var(--accent, #b73535); }
.ms-group.open .ms-caret { transform: rotate(180deg); color: var(--accent, #b73535); }

/* Expandable sub-items (bullet dots, like the reference) */
.ms-sub { overflow: hidden; max-height: 0; transition: max-height 280ms var(--ease, ease); }
.ms-group.open .ms-sub { max-height: 260px; }
.ms-sub a {
  position: relative;
  display: flex; align-items: center;
  padding: 11px 14px 11px 50px;
  margin: 2px 0;
  border-radius: 12px;
  font-size: 14.5px; font-weight: 600;
  color: var(--subtle, #77716a); text-decoration: none;
  transition: background 150ms var(--ease, ease), color 150ms var(--ease, ease);
}
.ms-sub a::before {
  content: ""; position: absolute; left: 25px; top: 50%; transform: translateY(-50%);
  width: 5px; height: 5px; border-radius: 50%;
  background: currentColor; opacity: 0.55;
}
.ms-sub a:hover { background: var(--surface-soft, #fff4df); color: var(--accent, #b73535); }
.ms-sub a.active { color: var(--accent, #b73535); font-weight: 700; }
.ms-sub a.active::before { opacity: 1; }

/* Footer: language toggle */
.ms-foot { margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--card-border, rgba(120, 84, 58, 0.18)); }
.ms-lang .ms-label,
.ms-theme .ms-label { font-weight: 700; }
.ms-langcode,
.ms-themecode {
  flex: 0 0 auto; margin-left: auto;
  font-size: 12.5px; font-weight: 800; color: var(--accent, #b73535);
  background: var(--accent-soft, rgba(183, 53, 53, 0.12));
  padding: 4px 11px; border-radius: 999px;
}

@media (max-width: 560px) {
  .ms-sidebar { top: 8px; right: 8px; bottom: 8px; width: min(320px, 90vw); border-radius: 22px; }
}

/* ============================================================
   BRAND LOGO  ·  cute panda (images/panda-logo.webp) replaces the
   inline pixel-panda in the left-side page logo and the sidebar
   header. One rule, every page (ui-kit loads on all of them).
   ============================================================ */
.nav-logo > svg,
.nav-home > svg,
.ms-brand-ic > svg { display: none !important; }

.nav-logo::before,
.nav-home::before {
  content: "";
  flex: 0 0 auto;
  display: inline-block;
  width: 38px;
  height: 38px;
  background: url("/images/panda-logo.webp") center / contain no-repeat;
}
.ms-brand-ic::before {
  content: "";
  display: inline-block;
  width: 32px;
  height: 32px;
  background: url("/images/panda-logo.webp") center / contain no-repeat;
}

/* ============================================================
   SHARED TOAST / SNACKBAR  (window.showAppToast in gnav.js)
   A lightweight, non-blocking confirmation available on every
   page that loads gnav.js + ui-kit.css. Replaces bare alert().
   ============================================================ */
.uk-toast-wrap {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%);
  pointer-events: none;
  width: max-content;
  max-width: min(440px, calc(100vw - 28px));
}
.uk-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  font-family: var(--font-body, -apple-system, sans-serif);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
  background: var(--text, #1d1d1f);
  box-shadow: 0 16px 38px rgba(45, 28, 20, 0.26);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  transition: opacity 220ms var(--ease, ease), transform 220ms var(--ease, ease);
}
.uk-toast.show { opacity: 1; transform: translateY(0) scale(1); }
.uk-toast::before {
  content: "";
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold, #d9a43a);
}
.uk-toast--success { background: #1f7a4d; }
.uk-toast--success::before { background: #8be0ac; }
.uk-toast--error { background: var(--accent, #b73535); }
.uk-toast--error::before { background: #ffc9c9; }

/* ============================================================
   SKELETON LOADER  (.uk-skeleton)  — shimmer placeholder used
   while async content loads, for better perceived performance.
   ============================================================ */
.uk-skeleton {
  position: relative;
  overflow: hidden;
  background: var(--surface-soft, #fff4df);
  border-radius: 12px;
}
.uk-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent 0,
    rgba(var(--glass-rgb), 0.55) 50%,
    transparent 100%
  );
  animation: ukShimmer 1.25s var(--ease, ease) infinite;
}
@keyframes ukShimmer { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) {
  .uk-skeleton::after { animation: none; }
}

/* ============================================================
   MOBILE BOTTOM TAB BAR (bottom-nav.js) — Instagram-style
   Shown only on mobile; replaces the hamburger there.
   ============================================================ */
.ms-bottomnav { display: none; }

@media (max-width: 700px) {
  /* On mobile the bottom bar is the nav — hide the hamburger and show the
     standalone language toggle in its place (top-right). */
  .ms-burger { display: none !important; }
  .ms-toplang { display: inline-flex !important; }

  .ms-bottomnav {
    position: fixed;
    left: 0; right: 0; bottom: 0; top: auto;   /* top:auto guards vs stray `nav{top:0}` */
    height: auto;
    z-index: 1150;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: stretch;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
    background: color-mix(in srgb, var(--surface, #fffdf8) 88%, transparent);
    -webkit-backdrop-filter: saturate(1.4) blur(16px);
    backdrop-filter: saturate(1.4) blur(16px);
    border-top: 1px solid var(--card-border, rgba(120, 84, 58, 0.14));
  }

  .ms-bn-item {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 3px;
    padding: 7px 2px;
    text-decoration: none;
    color: var(--muted, #9a8b7c);
    border-radius: 14px;
    transition: color 160ms var(--ease, ease), transform 160ms var(--ease, ease);
    -webkit-tap-highlight-color: transparent;
  }
  .ms-bn-item:active { transform: scale(0.92); }

  .ms-bn-ic { width: 24px; height: 24px; display: grid; place-items: center; }
  .ms-bn-ic svg { width: 23px; height: 23px; display: block; }
  .ms-bn-label {
    font-family: "SukhumvitSet", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 10px; font-weight: 700; letter-spacing: 0.01em; line-height: 1;
  }

  .ms-bn-item.is-active { color: var(--accent, #b73535); }

  /* Center "Home" gets a subtle raised accent puck */
  .ms-bn-home .ms-bn-ic {
    width: 44px; height: 44px; border-radius: 16px;
    background: var(--accent, #b73535); color: #fff;
    box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--accent, #b73535) 70%, transparent);
    margin-top: -14px;
  }
  .ms-bn-home.is-active { color: var(--accent, #b73535); }
  .ms-bn-home .ms-bn-ic svg { width: 22px; height: 22px; }

  /* Keep page content clear of the bar */
  html.has-bottomnav body { padding-bottom: 68px; }
  /* Hide each site's own legacy bottom nav if present (MaliTrip) */
  html.has-bottomnav .bottom-nav { display: none !important; }
}
