@media screen {
  #hb-mobile-menu {--hb-dock-height:calc(56px + env(safe-area-inset-bottom,0px))}
  #hb-mobile-menu:has(.hbMobileBar) {display:block;height:var(--hb-dock-height);flex:none}
  body:has(.hb-nav) #hb-mobile-menu {display:none}
  body:has(.gcShell) #hb-mobile-menu {height:0}
  body:has(.hbMobileBar) .gcFrame {box-sizing:border-box;padding-bottom:var(--hb-dock-height,calc(56px + env(safe-area-inset-bottom,0px)))}
  .hbMobileBar,.hbMobileBar * {box-sizing:border-box}
  nav.hbMobileBar {display:grid;grid-template-columns:repeat(6,minmax(0,1fr));align-items:stretch;gap:0;position:fixed;z-index:32;inset:auto 0 0;
    height:var(--hb-dock-height);margin:0;padding:0 env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px);
    border:0;border-top:1px solid #e3dde2;border-radius:0;background:white;color:#24182a;font:400 16px/1.5 Inter,"Noto Sans Thai",sans-serif}
  .hbMobileBar > a,#hb-mobile-menu .hbMobileBar .postBell summary {position:relative;display:flex;align-items:center;justify-content:center;width:100%;height:100%;
    min-height:44px;margin:0;padding:0;color:#24182a;background:transparent;border:0;border-radius:0;text-decoration:none;cursor:pointer;list-style:none;-webkit-tap-highlight-color:transparent}
  .hbMobileBar .postBell {position:static;height:100%;margin:0}
  .hbMobileBar summary::-webkit-details-marker {display:none}
  .hbMobileBar .postBell summary span {display:flex}
  .hbMobileBar > a svg,.hbMobileBar summary svg {width:25px;height:25px;display:block;flex:none}
  .hbMobileBar > a[aria-current],#hb-mobile-menu .hbMobileBar .postBell[open] summary {color:#56104f}
  .hbMobileBar > a[aria-current]::after,.hbMobileBar .postBell[open] summary::after {content:"";position:absolute;top:0;width:23px;height:3px;border-radius:0 0 4px 4px;background:#56104f}
  .hbMobileBar > a[data-dest=home][aria-current] svg {fill:currentColor}
  .hbMobileBar:has(.postBell[open]) > a[aria-current] {color:#24182a}
  .hbMobileBar:has(.postBell[open]) > a[aria-current]::after {display:none}
  .hbMobileBar:has(.postBell[open]) > a[data-dest=home] svg {fill:none}
  .hbMobileBar > a img {position:absolute;width:29px;height:29px;object-fit:cover;border-radius:50%;background:white;border:1px solid #ddd5dd}
  .hbMobileBar > a[aria-current] img {outline:2px solid #56104f;outline-offset:1px}
  .hbMobileBar .postBell b:not([hidden]) {display:block;position:absolute;top:4px;right:auto;left:calc(50% + 1px);padding:0 4px;min-width:17px;
    color:white;background:#bd283e;border:2px solid white;border-radius:999px;text-align:center;font:700 0/15px Inter,Arial,sans-serif}
  .hbMobileBar .postBell b::after {content:attr(data-compact);font-size:11px}
  .hbMobileBar [hidden] {display:none!important}
  .hbMobileBar :is(a,button,summary):focus-visible {outline:2px solid #56104f;outline-offset:-3px}
  .hbMobileBar .bellPanel {position:absolute;inset:auto 8px calc(100% + 6px) auto;width:min(360px,calc(100vw - 16px));max-height:min(65vh,480px);overflow:auto;overscroll-behavior:contain;
    margin:0;padding:14px 16px;background:white;color:#24182a;border:1px solid #dfd6df;border-radius:16px;box-shadow:0 4px 20px #24182a26;text-align:left}
  .hbMobileBar .bellPanel h2 {margin:0 0 8px;color:#56104f;font:700 17px/1.5 Inter,"Noto Sans Thai",sans-serif}
  .hbMobileBar .bellList a {display:grid;gap:2px;padding:9px 0;border-bottom:1px solid #efe9ed;color:#24182a;text-decoration:none;font-size:14px;overflow-wrap:anywhere}
  .hbMobileBar .bellList small {color:#6b606a}
  .hbMobileBar .bellPanel p:empty {display:none}
  .hbMobileBar .bellPanel button {min-height:44px;margin-top:8px;border:0;border-radius:8px;padding:5px 12px;background:#f4edf2;color:#56104f;font:inherit}
}

@media (min-width:768px) {
  body:has(#hb-mobile-menu .hbMobileBar):not(:has(.hb-nav)) {
    --hb-rail-width:68px;
    margin-inline-start:var(--hb-rail-width);
  }
  #hb-mobile-menu:has(.hbMobileBar) {height:0}
  #hb-mobile-menu nav.hbMobileBar {
    inset:0 auto 0 0;width:var(--hb-rail-width,68px);height:auto;
    grid-template-columns:1fr;grid-auto-rows:minmax(0,52px);align-content:center;
    padding:6px;border:0;border-right:1px solid #e3dde2;
  }
  #hb-mobile-menu .hbMobileBar > a[aria-current]::after,
  #hb-mobile-menu .hbMobileBar .postBell[open] summary::after {
    inset:auto auto auto 0;width:3px;height:24px;border-radius:3px;
  }
  #hb-mobile-menu .hbMobileBar .bellPanel {
    position:fixed;inset:50% auto auto calc(var(--hb-rail-width,68px) + 8px);
    transform:translateY(-50%);max-height:min(85vh,480px);
  }
  body:has(.hbMobileBar) .gcFrame {padding-bottom:0}
  body:has(.hbMobileBar) .gcShell {left:var(--hb-rail-width,68px)}
}
