/* the Me tab's language switch (me_lang.py, 25 Nov 2026): one outlined pill, 44px to tap */
.me-lang{display:flex;justify-content:flex-end;margin:-8px 0 8px;}
.me-lang button{min-height:44px;padding:0 14px;border:1px solid var(--line);border-left-width:0;background:var(--card);
  color:var(--ink);font:inherit;font-size:14px;cursor:pointer;white-space:nowrap;}
.me-lang button:first-child{border-left-width:1px;border-radius:22px 0 0 22px;}
.me-lang button:last-child{border-radius:0 22px 22px 0;}
.me-lang button[aria-current]{background:var(--brand-l);color:var(--brand-d);font-weight:bold;}
.me-lang button:focus-visible{outline:2px solid var(--brand);outline-offset:-3px;}
.me-lang.out{justify-content:center;margin:24px auto -30px;}
@media (max-width:640px){.me-lang{justify-content:center;margin-top:-6px;}}

/* Me in Malay and Chinese: longer words, wider dates */
:lang(zh-Hans) .am .am-d:not(.wk){grid-template-columns:104px minmax(0,1fr) auto;}
:lang(zh-Hans) .am .am-d.hl{grid-template-columns:112px minmax(0,1fr);}
:lang(ms) .am .am-fi .t span{white-space:normal;}
:lang(ms) .am .am-tot span{white-space:normal;}
:lang(zh-Hans) .pill, :lang(ms) .th .pill{white-space:nowrap;}
@media (max-width:640px){
  /* the clock times are never cut: a long pill takes two lines */
  :lang(zh-Hans) .am .am-d:not(.wk):not(.hl){grid-template-columns:96px max-content minmax(0,1fr);column-gap:6px;}
  :lang(ms) .am .am-d:not(.wk):not(.hl){grid-template-columns:78px max-content minmax(0,1fr);column-gap:6px;}
  :lang(zh-Hans) .am .am-d:not(.wk):not(.hl)>span:nth-child(3), :lang(ms) .am .am-d:not(.wk):not(.hl)>span:nth-child(3){
    justify-self:end;text-align:right;}
  :lang(zh-Hans) .am .am-d .am-p, :lang(ms) .am .am-d .am-p{white-space:normal;display:inline-block;text-align:center;}
}
@media (min-width:900px){
  :lang(zh-Hans) .am .am-d:not(.wk){grid-template-columns:120px 150px minmax(0,1fr) auto;}
  :lang(zh-Hans) .am .am-d.hl{grid-template-columns:120px minmax(0,1fr);}
}
